Skip to content

Instantly share code, notes, and snippets.

@metacollin
Created September 15, 2016 05:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save metacollin/852a8016c22c4c7d710b7c96f0663331 to your computer and use it in GitHub Desktop.
Save metacollin/852a8016c22c4c7d710b7c96f0663331 to your computer and use it in GitHub Desktop.
=== modified file 'src/generic/scrlwing.cpp'
--- src/generic/scrlwing.cpp 2013-12-16 05:42:30 -0800
+++ src/generic/scrlwing.cpp 2014-10-21 01:19:02 -0700
@@ -214,9 +214,6 @@
return true;
}
- if ( processed && event.IsCommandEvent())
- return true;
-
// For wxEVT_PAINT the user code can either handle this event as usual or
// override virtual OnDraw(), so if the event hasn't been handled we need
// to call this virtual function ourselves.
@@ -235,6 +232,11 @@
return true;
}
+ // If the user code handled this event, it should prevent the default
+ // handling from taking place, so don't do anything else in this case.
+ if ( processed )
+ return true;
+
if ( evType == wxEVT_CHILD_FOCUS )
{
m_scrollHelper->HandleOnChildFocus((wxChildFocusEvent &)event);
=== modified file 'src/generic/vscroll.cpp'
--- src/generic/vscroll.cpp 2013-12-16 05:42:30 -0800
+++ src/generic/vscroll.cpp 2014-10-21 01:19:09 -0700
@@ -89,9 +89,6 @@
return true;
}
- if ( processed && event.IsCommandEvent())
- return true;
-
// For wxEVT_PAINT the user code can either handle this event as usual or
// override virtual OnDraw(), so if the event hasn't been handled we need
// to call this virtual function ourselves.
@@ -110,6 +107,11 @@
return true;
}
+ // If the user code handled this event, it should prevent the default
+ // handling from taking place, so don't do anything else in this case.
+ if ( processed )
+ return true;
+
// reset the skipped flag (which might have been set to true in
// ProcessEvent() above) to be able to test it below
bool wasSkipped = event.GetSkipped();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment