Fixed bug: SetPropertyValueUnspecified(p) and p->SetValue(wxNullVariant) were out of sync

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2009-01-11 16:24:00 +00:00
parent 85fe9f6f89
commit daeb4e4d4c
7 changed files with 15 additions and 66 deletions

View File

@@ -1185,24 +1185,6 @@ void wxPropertyGrid::PrepareAfterItemsAdded()
RecalculateVirtualSize();
}
// -----------------------------------------------------------------------
// wxPropertyGrid property value setting and getting
// -----------------------------------------------------------------------
void wxPropertyGrid::DoSetPropertyValueUnspecified( wxPGProperty* p )
{
m_pState->DoSetPropertyValueUnspecified(p);
DrawItemAndChildren(p);
wxPGProperty* parent = p->GetParent();
while ( parent &&
(parent->GetFlags() & wxPG_PROP_PARENTAL_FLAGS) == wxPG_PROP_MISC_PARENT )
{
DrawItem(parent);
parent = parent->GetParent();
}
}
// -----------------------------------------------------------------------
// wxPropertyGrid property operations
// -----------------------------------------------------------------------
@@ -3635,7 +3617,12 @@ void wxPropertyGrid::RefreshEditor()
wnd->SetFont(GetFont());
}
p->GetEditorClass()->UpdateControl(p, wnd);
const wxPGEditor* editorClass = p->GetEditorClass();
editorClass->UpdateControl(p, wnd);
if ( p->IsValueUnspecified() )
editorClass ->SetValueToUnspecified(p, wnd);
}
// -----------------------------------------------------------------------