Forbid creation of wxPaintEvent objects from user code
This doesn't work anyhow, so it's better to prevent the code doing this from compiling instead of getting run-time asserts or worse. Also simplify construction of these events inside wxWidgets by passing the window itself to the ctor instead of passing just its ID and calling SetEventObject() separately later. For consistency, do the same thing for wxNcPaintEvent too.
This commit is contained in:
@@ -2222,7 +2222,7 @@ public:
|
||||
need a window to be repainted, use wxWindow::Refresh() instead of
|
||||
trying to manually create an event of this class.
|
||||
*/
|
||||
wxPaintEvent(int id = 0);
|
||||
explicit wxPaintEvent(wxWindow* window);
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user