Fix selected item count in the properties panel
The code for updating selected item count is skipped if the properties items don't change.
This commit is contained in:
parent
81855aaaa6
commit
3f2e3d89e2
|
@ -184,6 +184,14 @@ void PROPERTIES_PANEL::rebuildProperties( const SELECTION& aSelection )
|
||||||
reset();
|
reset();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if( aSelection.Size() == 1 )
|
||||||
|
{
|
||||||
|
m_caption->SetLabel( aSelection.Front()->GetFriendlyName() );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_caption->SetLabel( wxString::Format( _( "%d objects selected" ), aSelection.Size() ) );
|
||||||
|
}
|
||||||
|
|
||||||
// Get all the selected types
|
// Get all the selected types
|
||||||
std::set<TYPE_ID> types;
|
std::set<TYPE_ID> types;
|
||||||
|
@ -302,15 +310,6 @@ void PROPERTIES_PANEL::rebuildProperties( const SELECTION& aSelection )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( aSelection.Size() > 1 )
|
|
||||||
{
|
|
||||||
m_caption->SetLabel( wxString::Format( _( "%d objects selected" ), aSelection.Size() ) );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_caption->SetLabel( aSelection.Front()->GetFriendlyName() );
|
|
||||||
}
|
|
||||||
|
|
||||||
const wxString unspecifiedGroupCaption = _( "Basic Properties" );
|
const wxString unspecifiedGroupCaption = _( "Basic Properties" );
|
||||||
|
|
||||||
for( const wxString& groupName : groupDisplayOrder )
|
for( const wxString& groupName : groupDisplayOrder )
|
||||||
|
|
Loading…
Reference in New Issue