Set built-in attributes also for parent wxPGProperties

If given attribute is not a built-in attribute handled by the current property it should be passed to the parent property because it may be handled there.
This commit is contained in:
Artur Wieczorek
2019-04-22 13:17:58 +02:00
parent 0c144f6cda
commit cbfff9c944
3 changed files with 14 additions and 13 deletions

View File

@@ -642,7 +642,7 @@ bool wxArrayDoubleProperty::DoSetAttribute( const wxString& name, wxVariant& val
GenerateValueAsString( m_display, m_precision, true );
return true;
}
return false;
return wxPGProperty::DoSetAttribute(name, value);
}
wxValidator* wxArrayDoubleProperty::DoGetValidator() const

View File

@@ -1600,8 +1600,7 @@ bool wxSystemColourProperty::DoSetAttribute( const wxString& name, wxVariant& va
return true;
}
return false;
return wxEnumProperty::DoSetAttribute(name, value);
}
@@ -2234,7 +2233,7 @@ bool wxMultiChoiceProperty::DoSetAttribute( const wxString& name, wxVariant& val
m_userStringMode = (int)value.GetLong();
return true;
}
return false;
return wxPGProperty::DoSetAttribute(name, value);
}
#endif // wxUSE_CHOICEDLG
@@ -2370,7 +2369,7 @@ bool wxDateProperty::DoSetAttribute( const wxString& name, wxVariant& value )
ms_defaultDateFormat.clear(); // This may need recalculation
return true;
}
return false;
return wxPGProperty::DoSetAttribute(name, value);
}
#endif // wxUSE_DATETIME

View File

@@ -149,7 +149,7 @@ bool wxStringProperty::DoSetAttribute( const wxString& name, wxVariant& value )
RecreateEditor();
return true;
}
return false;
return wxPGProperty::DoSetAttribute(name, value);
}
// -----------------------------------------------------------------------
@@ -875,7 +875,7 @@ bool wxUIntProperty::DoSetAttribute( const wxString& name, wxVariant& value )
m_prefix = (wxByte) value.GetLong();
return true;
}
return false;
return wxPGProperty::DoSetAttribute(name, value);
}
// -----------------------------------------------------------------------
@@ -1035,7 +1035,7 @@ bool wxFloatProperty::DoSetAttribute( const wxString& name, wxVariant& value )
m_precision = value.GetLong();
return true;
}
return false;
return wxPGProperty::DoSetAttribute(name, value);
}
wxValidator*
@@ -1181,7 +1181,7 @@ bool wxBoolProperty::DoSetAttribute( const wxString& name, wxVariant& value )
m_flags &= ~(wxPG_PROP_USE_DCC);
return true;
}
return false;
return wxPGProperty::DoSetAttribute(name, value);
}
// -----------------------------------------------------------------------
@@ -1854,7 +1854,7 @@ bool wxFlagsProperty::DoSetAttribute( const wxString& name, wxVariant& value )
}
return true;
}
return false;
return wxPGProperty::DoSetAttribute(name, value);
}
// -----------------------------------------------------------------------
@@ -1919,7 +1919,7 @@ bool wxDirProperty::DoSetAttribute( const wxString& name, wxVariant& value )
m_dlgMessage = value.GetString();
return true;
}
return false;
return wxLongStringProperty::DoSetAttribute(name, value);
}
// -----------------------------------------------------------------------
@@ -2145,6 +2145,7 @@ bool wxFileProperty::DoSetAttribute( const wxString& name, wxVariant& value )
else if ( name == wxPG_FILE_WILDCARD )
{
m_wildcard = value.GetString();
return false;
}
else if ( name == wxPG_FILE_SHOW_RELATIVE_PATH )
{
@@ -2152,6 +2153,7 @@ bool wxFileProperty::DoSetAttribute( const wxString& name, wxVariant& value )
// Make sure wxPG_FILE_SHOW_FULL_PATH is also set
m_flags |= wxPG_PROP_SHOW_FULL_FILENAME;
return false;
}
else if ( name == wxPG_FILE_INITIAL_PATH )
{
@@ -2163,7 +2165,7 @@ bool wxFileProperty::DoSetAttribute( const wxString& name, wxVariant& value )
m_dlgTitle = value.GetString();
return true;
}
return false;
return wxPGProperty::DoSetAttribute(name, value);
}
// -----------------------------------------------------------------------
@@ -2925,7 +2927,7 @@ bool wxArrayStringProperty::DoSetAttribute( const wxString& name, wxVariant& val
GenerateValueAsString();
return true;
}
return false;
return wxPGProperty::DoSetAttribute(name, value);
}
// -----------------------------------------------------------------------