]> git.saurik.com Git - wxWidgets.git/commitdiff
making sure images are in synch with the pages
authorStefan Csomor <csomor@advancedconcepts.ch>
Mon, 15 Jul 2013 16:36:20 +0000 (16:36 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Mon, 15 Jul 2013 16:36:20 +0000 (16:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/notebook_osx.cpp

index 90dc4888636f0eaa806f27b652db64771d7aa03f..bbe6f0a4cdaff9da977bd6d0aef3c88f1cd7af90 100644 (file)
@@ -173,6 +173,7 @@ wxNotebookPage* wxNotebook::DoRemovePage(size_t nPage)
 
     wxNotebookPage* page = m_pages[nPage] ;
     m_pages.RemoveAt(nPage);
+    m_images.RemoveAt(nPage);
 
     MacSetupTabs();
 
@@ -190,7 +191,8 @@ wxNotebookPage* wxNotebook::DoRemovePage(size_t nPage)
 // remove all pages
 bool wxNotebook::DeleteAllPages()
 {
-    WX_CLEAR_ARRAY(m_pages) ;
+    WX_CLEAR_ARRAY(m_pages);
+    m_images.clear();
     MacSetupTabs();
     m_selection = wxNOT_FOUND ;
     InvalidateBestSize();