Fixed bug: Settings property attribute to wxNullVariant would cause GetAttribute() to fail (wxPG SourceForge bug #2128485)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2008-09-25 16:13:32 +00:00
parent 81d73efcc3
commit 1802a91dec
4 changed files with 33 additions and 1 deletions

View File

@@ -946,6 +946,21 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
#endif
}
{
RT_START_TEST(Attributes)
wxPGProperty* prop = pgman->GetProperty(wxT("StringProperty"));
prop->SetAttribute(wxT("Dummy Attribute"), (long)15);
if ( prop->GetAttribute(wxT("Dummy Attribute")).GetLong() != 15 )
RT_FAILURE();
prop->SetAttribute(wxT("Dummy Attribute"), wxVariant());
if ( !prop->GetAttribute(wxT("Dummy Attribute")).IsNull() )
RT_FAILURE();
}
{
wxPropertyGridPage* page1;
wxPropertyGridPage* page2;