Properties: Use insertion order as display order
This commit is contained in:
parent
fc062e8a19
commit
a8cb0ee116
|
@ -136,6 +136,7 @@ void PROPERTY_MANAGER::AddProperty( PROPERTY_BASE* aProperty, const wxString& aG
|
|||
TYPE_ID hash = aProperty->OwnerHash();
|
||||
CLASS_DESC& classDesc = getClass( hash );
|
||||
classDesc.m_ownProperties.emplace( name, aProperty );
|
||||
classDesc.m_ownDisplayOrder.emplace_back( aProperty );
|
||||
|
||||
aProperty->SetGroup( aGroup );
|
||||
|
||||
|
@ -301,9 +302,8 @@ void PROPERTY_MANAGER::CLASS_DESC::collectPropsRecur( PROPERTY_LIST& aResult,
|
|||
|
||||
int idx = 0;
|
||||
|
||||
for( const std::pair<const wxString, std::unique_ptr<PROPERTY_BASE>>& prop : m_ownProperties )
|
||||
for( PROPERTY_BASE* property : m_ownDisplayOrder )
|
||||
{
|
||||
PROPERTY_BASE* property = prop.second.get();
|
||||
PROPERTY_SET::key_type propertyKey = std::make_pair( property->OwnerHash(),
|
||||
property->Name() );
|
||||
// Do not store replaced properties
|
||||
|
|
|
@ -252,10 +252,16 @@ private:
|
|||
///< All properties (both unique to the type and inherited)
|
||||
std::vector<PROPERTY_BASE*> m_allProperties;
|
||||
|
||||
///< Compiled display order for all properties
|
||||
PROPERTY_DISPLAY_ORDER m_displayOrder;
|
||||
|
||||
///< List of property groups provided by this class in display order
|
||||
std::vector<wxString> m_groupDisplayOrder;
|
||||
|
||||
///< Non-owning list of classes's direct properties in display order
|
||||
std::vector<PROPERTY_BASE*> m_ownDisplayOrder;
|
||||
|
||||
///< The property groups provided by this class
|
||||
std::set<wxString> m_groups;
|
||||
|
||||
///< Replaced properties (TYPE_ID / name)
|
||||
|
|
Loading…
Reference in New Issue