// FOR NOW::
if ( mpFrame->GetEventHandler() == this )
-
+ {
mpFrame->PopEventHandler();
+ return;
+ }
- return;
-
- // TBD ???: Cannot reach this code
if ( mpFrame )
{
if ( this == mpFrame->GetEventHandler() )
-
+ {
mpFrame->SetEventHandler( this->GetNextHandler() );
+ }
else
- {
- wxEvtHandler* pCur = mpFrame->GetEventHandler();
-
- while( pCur )
- {
- if ( pCur == this ) break;
+ {
+ wxEvtHandler* pCur = mpFrame->GetEventHandler();
- pCur = pCur->GetNextHandler();
- }
+ while ( pCur )
+ {
+ if ( pCur == this )
+ break;
- // do not try to unhook ourselves if we're not hooked yet
- if ( !pCur ) return;
+ pCur = pCur->GetNextHandler();
}
- if ( GetPreviousHandler() )
+ // do not try to unhook ourselves if we're not hooked yet
+ if ( !pCur )
+ return;
+ }
+ if ( GetPreviousHandler() )
GetPreviousHandler()->SetNextHandler( GetNextHandler() );
else
{
return;
}
-
if ( GetNextHandler() )
-
GetNextHandler()->SetPreviousHandler( GetPreviousHandler() );
SetNextHandler( NULL );