Changed how the dynamic event tables (used for all Python wx classes,
C++ wx classes typically use static event tables) are searched such that they behave from a Python perspective more like the static tables in C++. Namely that if there are identical event bindings in a base Python class and a derived Python class that the one in the derived class will be found first and that if Skip is called that the one in the base class will still be found instead of skipping directly to the static stable in the C++ class. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
a9d3434a3b
commit
9230920176
@ -390,7 +390,7 @@ wxMouseEvent::wxMouseEvent(wxEventType commandType)
|
||||
void wxMouseEvent::Assign(const wxMouseEvent& event)
|
||||
{
|
||||
m_eventType = event.m_eventType;
|
||||
|
||||
|
||||
m_x = event.m_x;
|
||||
m_y = event.m_y;
|
||||
|
||||
@ -550,7 +550,7 @@ wxKeyEvent::wxKeyEvent(wxEventType type)
|
||||
#endif
|
||||
}
|
||||
|
||||
wxKeyEvent::wxKeyEvent(const wxKeyEvent& evt)
|
||||
wxKeyEvent::wxKeyEvent(const wxKeyEvent& evt)
|
||||
: wxEvent(evt)
|
||||
{
|
||||
m_x = evt.m_x;
|
||||
@ -565,7 +565,7 @@ wxKeyEvent::wxKeyEvent(const wxKeyEvent& evt)
|
||||
m_scanCode = evt.m_scanCode;
|
||||
m_rawCode = evt.m_rawCode;
|
||||
m_rawFlags = evt.m_rawFlags;
|
||||
|
||||
|
||||
#if wxUSE_UNICODE
|
||||
m_uniChar = evt.m_uniChar;
|
||||
#endif
|
||||
@ -986,7 +986,8 @@ void wxEvtHandler::Connect( int id, int lastId,
|
||||
if (!m_dynamicEvents)
|
||||
m_dynamicEvents = new wxList;
|
||||
|
||||
m_dynamicEvents->Append( (wxObject*) entry );
|
||||
// Insert at the front of the list so most recent additions are found first
|
||||
m_dynamicEvents->Insert( (wxObject*) entry );
|
||||
}
|
||||
|
||||
bool wxEvtHandler::Disconnect( int id, int lastId, wxEventType eventType,
|
||||
@ -1052,9 +1053,7 @@ bool wxEvtHandler::SearchDynamicEventTable( wxEvent& event )
|
||||
|
||||
(this->*((wxEventFunction) (entry->m_fn)))(event);
|
||||
|
||||
if (event.GetSkipped())
|
||||
return FALSE;
|
||||
else
|
||||
if ( ! event.GetSkipped() )
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user