Add RAII wrapper for GTKDisableEvents/GTKEnableEvents() calls
Ensure GTKEnableEvents() is called automatically on scope exit whenever GTKDisableEvents() is called. This fixes a couple of potential bugs where GTKEnableEvents() could be not called if wxCHECK() condition failed and makes the code shorter and safer.
This commit is contained in:
@@ -54,10 +54,10 @@ public:
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
protected:
|
||||
void GTKDisableEvents();
|
||||
void GTKEnableEvents();
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const wxOVERRIDE;
|
||||
virtual void DoApplyWidgetStyle(GtkRcStyle *style) wxOVERRIDE;
|
||||
|
||||
|
Reference in New Issue
Block a user