From 1d73f41603de8103218a8460792f244230c6a7b1 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 27 Aug 2003 17:11:39 +0000 Subject: [PATCH] added support for range types to runtime depersister git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/xtistrm.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) 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 ) ; + } + } + } } -- 2.47.2