diff --git a/src/common/xtistrm.cpp b/src/common/xtistrm.cpp index 5f5563cd21..0c3b09a079 100644 --- a/src/common/xtistrm.cpp +++ b/src/common/xtistrm.cpp @@ -511,9 +511,22 @@ void wxRuntimeDepersister::SetConnect(int eventSourceObjectID, if ( ehsource && ehsink ) { - ehsource->Connect( -1 , delegateInfo->GetEventType() , - handlerInfo->GetEventFunction() , NULL /*user data*/ , - ehsink ) ; + if( delegateInfo->GetLastEventType() == -1 ) + { + ehsource->Connect( -1 , delegateInfo->GetEventType() , + handlerInfo->GetEventFunction() , NULL /*user data*/ , + ehsink ) ; + } + else + { + for ( wxEventType iter = delegateInfo->GetEventType() ; iter <= delegateInfo->GetLastEventType() ; ++iter ) + { + ehsource->Connect( -1 , iter , + handlerInfo->GetEventFunction() , NULL /*user data*/ , + ehsink ) ; + } + } + } }