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:
@@ -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);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user