Added Description Box Height to saveable/restoreable editable state
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1012,6 +1012,11 @@ wxString wxPropertyGridInterface::SaveEditableState( int includedStates ) const
|
||||
else
|
||||
result += wxS("0;");
|
||||
}
|
||||
if ( includedStates & DescBoxState )
|
||||
{
|
||||
wxVariant v = GetEditableStateItem(wxS("descboxheight"));
|
||||
result += wxString::Format(wxS("descboxheight=%i;"), (int)v.GetLong());
|
||||
}
|
||||
result.RemoveLast(); // Remove last semicolon
|
||||
result += wxS("|");
|
||||
}
|
||||
@@ -1149,6 +1154,21 @@ bool wxPropertyGridInterface::RestoreEditableState( const wxString& src, int res
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( key == wxS("descboxheight") )
|
||||
{
|
||||
if ( restoreStates & DescBoxState )
|
||||
{
|
||||
long descBoxHeight;
|
||||
if ( values.size() == 1 && values[0].ToLong(&descBoxHeight) )
|
||||
{
|
||||
SetEditableStateItem(wxS("descboxheight"), descBoxHeight);
|
||||
}
|
||||
else
|
||||
{
|
||||
res = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
res = false;
|
||||
|
Reference in New Issue
Block a user