When wxPGProperty is un-attached from wxPropertyGrid, keep its 'default' cell references invalid/NULL (fixes #12552)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65788 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1030,13 +1030,17 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
|
||||
wxPGProperty* p;
|
||||
|
||||
wxPGProperty* origParent =
|
||||
pgman->GetProperty(wxT("Window Styles"))->GetParent();
|
||||
pgman->GetProperty("Window Styles")->GetParent();
|
||||
|
||||
p = pgman->RemoveProperty(wxT("Window Styles"));
|
||||
// For testing purposes, let's set some custom cell colours
|
||||
p = pgman->GetProperty("Window Styles");
|
||||
p->SetCell(2, wxPGCell("style"));
|
||||
p = pgman->RemoveProperty("Window Styles");
|
||||
pgman->Refresh();
|
||||
pgman->Update();
|
||||
|
||||
pgman->AppendIn(origParent, p);
|
||||
wxASSERT( p->GetCell(2).GetText() == "style");
|
||||
pgman->Refresh();
|
||||
pgman->Update();
|
||||
}
|
||||
|
Reference in New Issue
Block a user