Clear grid selection more consistently prior clear operations; improved Clear() tests (fixes #10497)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2009-02-17 18:01:06 +00:00
parent 2250d25c06
commit 8dee26e107
4 changed files with 29 additions and 5 deletions

View File

@@ -1005,12 +1005,29 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
}
{
RT_START_TEST(ManagerClear)
RT_START_TEST(Clear)
// Manager clear
pgman->SelectProperty("Label");
pgman->Clear();
if ( pgman->GetPageCount() )
RT_FAILURE();
if ( pgman->GetGrid()->GetRoot()->GetChildCount() )
RT_FAILURE();
// Recreate the original grid
CreateGrid( -1, -1 );
pgman = m_pPropGridManager;
// Grid clear
pgman->SelectProperty("Label");
pgman->GetGrid()->Clear();
if ( pgman->GetGrid()->GetRoot()->GetChildCount() )
RT_FAILURE();
// Recreate the original grid
CreateGrid( -1, -1 );
pgman = m_pPropGridManager;