]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/notebook.cpp
new xml in main tree adaptions
[wxWidgets.git] / src / msw / notebook.cpp
index f2b88f379e0c39d8a6f379a117a3620dac92d13b..a69381be92bd3e452da728d6ec0df1bc1aa0b415 100644 (file)
@@ -424,7 +424,8 @@ wxNotebookPage *wxNotebook::DoRemovePage(int nPage)
             // for some unknown reason if the tab control shows the up-down
             // control (i.e. when there are too many pages) -- otherwise after
             // deleting a page nothing at all is shown
-            m_pages[m_nSelection]->Refresh();
+            if (m_nSelection >= 0)
+                m_pages[m_nSelection]->Refresh();
         }
 
         if ( selNew != -1 )
@@ -668,9 +669,9 @@ void wxNotebook::OnNavigationKey(wxNavigationKeyEvent& event)
         // OnSetFocus() because we don't know which direction the focus came
         // from in this case and so can't choose between setting the focus to
         // first or last panel child
-
         wxWindow *parent = GetParent();
-        if ( event.GetEventObject() == parent )
+        // the cast is here to fic a GCC ICE
+        if ( ((wxWindow*)event.GetEventObject()) == parent )
         {
             // no, it doesn't come from child, case (b): forward to a page
             if ( m_nSelection != -1 )
@@ -822,11 +823,14 @@ void wxNotebook::ApplyThemeBackground(wxWindow* window, const wxColour& colour)
         window->SetBackgroundColour(colour);
     }
 
-    for ( wxWindowList::Node *node = window->GetChildren().GetFirst(); node; node = node->GetNext() )
+    for ( wxWindowList::compatibility_iterator node = window->GetChildren().GetFirst(); node; node = node->GetNext() )
     {
         wxWindow *child = node->GetData();
         ApplyThemeBackground(child, colour);
     }
+#else
+    window;
+    colour;
 #endif
 }