]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/notebook.cpp
Worked around static box opaqueness problem on WinCE by setting the
[wxWidgets.git] / src / gtk / notebook.cpp
index 1e73e040c1994a5f671e2220f63ec5642652acf3..91114c04914d39bf28355a2912dec3cb80dd30c5 100644 (file)
@@ -566,7 +566,7 @@ bool wxNotebook::DeleteAllPages()
 
 bool wxNotebook::DeletePage( size_t page )
 {
-    if ( m_selection == (int)m_pagesData.GetCount() - 1 )
+    if ( m_selection != -1 && (size_t)m_selection >= page )
     {
         // the index will become invalid after the page is deleted
         m_selection = -1;