DeleteAllPages() bug corrected
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
// Name: msw/notebook.cpp
|
// Name: msw/notebook.cpp
|
||||||
// Purpose: implementation of wxNotebook
|
// Purpose: implementation of wxNotebook
|
||||||
// Author: Vadim Zeitlin
|
// Author: Vadim Zeitlin
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 11.06.98
|
// Created: 11.06.98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||||
@@ -169,9 +169,9 @@ bool wxNotebook::Create(wxWindow *parent,
|
|||||||
(WPARAM)::GetStockObject(DEFAULT_GUI_FONT),TRUE);
|
(WPARAM)::GetStockObject(DEFAULT_GUI_FONT),TRUE);
|
||||||
|
|
||||||
|
|
||||||
if ( parent != NULL )
|
if ( parent != NULL )
|
||||||
parent->AddChild(this);
|
parent->AddChild(this);
|
||||||
|
|
||||||
SubclassWin(m_hWnd);
|
SubclassWin(m_hWnd);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -267,7 +267,7 @@ bool wxNotebook::SetPageImage(int nPage, int nImage)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void wxNotebook::SetImageList(wxImageList* imageList)
|
void wxNotebook::SetImageList(wxImageList* imageList)
|
||||||
{
|
{
|
||||||
m_pImageList = imageList;
|
m_pImageList = imageList;
|
||||||
TabCtrl_SetImageList(m_hwnd, (HIMAGELIST)imageList->GetHIMAGELIST());
|
TabCtrl_SetImageList(m_hwnd, (HIMAGELIST)imageList->GetHIMAGELIST());
|
||||||
}
|
}
|
||||||
@@ -304,8 +304,6 @@ bool wxNotebook::RemovePage(int nPage)
|
|||||||
// remove all pages
|
// remove all pages
|
||||||
bool wxNotebook::DeleteAllPages()
|
bool wxNotebook::DeleteAllPages()
|
||||||
{
|
{
|
||||||
TabCtrl_DeleteAllItems(m_hwnd);
|
|
||||||
|
|
||||||
int nPageCount = GetPageCount();
|
int nPageCount = GetPageCount();
|
||||||
int nPage;
|
int nPage;
|
||||||
for ( nPage = 0; nPage < nPageCount; nPage++ )
|
for ( nPage = 0; nPage < nPageCount; nPage++ )
|
||||||
@@ -313,6 +311,8 @@ bool wxNotebook::DeleteAllPages()
|
|||||||
|
|
||||||
m_aPages.Clear();
|
m_aPages.Clear();
|
||||||
|
|
||||||
|
TabCtrl_DeleteAllItems(m_hwnd);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -363,7 +363,7 @@ bool wxNotebook::InsertPage(int nPage,
|
|||||||
// save the pointer to the page
|
// save the pointer to the page
|
||||||
m_aPages.Insert(pPage, nPage);
|
m_aPages.Insert(pPage, nPage);
|
||||||
|
|
||||||
// some page must be selected: either this one or the first one if there is
|
// some page must be selected: either this one or the first one if there is
|
||||||
// still no selection
|
// still no selection
|
||||||
if ( bSelect )
|
if ( bSelect )
|
||||||
m_nSelection = nPage;
|
m_nSelection = nPage;
|
||||||
|
Reference in New Issue
Block a user