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:
@@ -1208,33 +1208,6 @@ bool wxPropertyGridPageState::DoSetPropertyValueWxObjectPtr( wxPGProperty* p, wx
|
||||
return false;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
void wxPropertyGridPageState::DoSetPropertyValueUnspecified( wxPGProperty* p )
|
||||
{
|
||||
wxCHECK_RET( p, wxT("invalid property id") );
|
||||
|
||||
if ( !p->IsValueUnspecified() )
|
||||
{
|
||||
// Value should be set first - editor class methods may need it
|
||||
p->m_value.MakeNull();
|
||||
|
||||
wxASSERT( m_pPropGrid );
|
||||
|
||||
if ( m_pPropGrid->GetState() == this )
|
||||
{
|
||||
if ( m_pPropGrid->m_selected == p && m_pPropGrid->m_wndEditor )
|
||||
{
|
||||
p->GetEditorClass()->SetValueToUnspecified(p, m_pPropGrid->GetEditorControl());
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int i;
|
||||
for ( i = 0; i < p->GetChildCount(); i++ )
|
||||
DoSetPropertyValueUnspecified( p->Item(i) );
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// wxPropertyGridPageState property operations
|
||||
// -----------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user