]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed code that should have been enclosed in brackets but wasn't, causing the program...
authorGeorge Tasker <gtasker@allenbrook.com>
Tue, 30 Oct 2001 13:40:23 +0000 (13:40 +0000)
committerGeorge Tasker <gtasker@allenbrook.com>
Tue, 30 Oct 2001 13:40:23 +0000 (13:40 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12213 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/src/fl/controlbar.cpp

index 6e87a6ed33bb069e1d2f1fef7cff25536153e4b4..fd02e78c2914c2c071f717ce49a91c7f67096bce 100644 (file)
@@ -1194,34 +1194,35 @@ void wxFrameLayout::UnhookFromFrame()
        // 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
                {
@@ -1229,9 +1230,7 @@ void wxFrameLayout::UnhookFromFrame()
                        return;
                }
 
-
                if ( GetNextHandler() )
-
                        GetNextHandler()->SetPreviousHandler( GetPreviousHandler() );
 
                SetNextHandler( NULL );