]> git.saurik.com Git - wxWidgets.git/commitdiff
compilation warning fix
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 25 Jul 2004 17:25:04 +0000 (17:25 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 25 Jul 2004 17:25:04 +0000 (17:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/notebook.cpp
src/gtk1/notebook.cpp

index b7f8177a6f847e578bc990b6a629c28ecc68974a..91114c04914d39bf28355a2912dec3cb80dd30c5 100644 (file)
@@ -566,7 +566,7 @@ bool wxNotebook::DeleteAllPages()
 
 bool wxNotebook::DeletePage( size_t page )
 {
-    if ( m_selection >= page )
+    if ( m_selection != -1 && (size_t)m_selection >= page )
     {
         // the index will become invalid after the page is deleted
         m_selection = -1;
index b7f8177a6f847e578bc990b6a629c28ecc68974a..91114c04914d39bf28355a2912dec3cb80dd30c5 100644 (file)
@@ -566,7 +566,7 @@ bool wxNotebook::DeleteAllPages()
 
 bool wxNotebook::DeletePage( size_t page )
 {
-    if ( m_selection >= page )
+    if ( m_selection != -1 && (size_t)m_selection >= page )
     {
         // the index will become invalid after the page is deleted
         m_selection = -1;