Removed dysfunctional wxPGPropery::PrepareValueForDialogEditing(); Replaced its functionality with wxPropertyGrid::GetPendingEditedValue(); Added wxPropertyGrid::PerformValidation() flags so it can be called in generic context.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56169 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -531,11 +531,11 @@ bool wxFontProperty::OnEvent( wxPropertyGrid* propgrid, wxWindow* WXUNUSED(prima
|
||||
if ( propgrid->IsMainButtonEvent(event) )
|
||||
{
|
||||
// Update value from last minute changes
|
||||
PrepareValueForDialogEditing(propgrid);
|
||||
wxVariant useValue = propgrid->GetPendingEditedValue();
|
||||
|
||||
wxFontData data;
|
||||
wxFont font;
|
||||
font << m_value;
|
||||
font << useValue;
|
||||
data.SetInitialFont( font );
|
||||
data.SetColour(*wxBLACK);
|
||||
|
||||
@@ -1803,7 +1803,7 @@ bool wxMultiChoiceProperty::OnEvent( wxPropertyGrid* propgrid,
|
||||
if ( propgrid->IsMainButtonEvent(event) )
|
||||
{
|
||||
// Update the value
|
||||
PrepareValueForDialogEditing(propgrid);
|
||||
wxVariant useValue = propgrid->GetPendingEditedValue();
|
||||
|
||||
wxArrayString labels = m_choices.GetLabels();
|
||||
unsigned int choiceCount;
|
||||
@@ -1823,7 +1823,7 @@ bool wxMultiChoiceProperty::OnEvent( wxPropertyGrid* propgrid,
|
||||
|
||||
dlg.Move( propgrid->GetGoodEditorDialogPosition(this,dlg.GetSize()) );
|
||||
|
||||
wxArrayString strings = m_value.GetArrayString();
|
||||
wxArrayString strings = useValue.GetArrayString();
|
||||
wxArrayString extraStrings;
|
||||
|
||||
dlg.SetSelections(m_choices.GetIndicesForStrings(strings, &extraStrings));
|
||||
|
Reference in New Issue
Block a user