mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-07 12:10:52 -06:00
Sort properties by name in the GUI
This commit is contained in:
@@ -102,7 +102,14 @@ void GuiPropertyComponent::render() {
|
||||
ImGui::Spacing();
|
||||
|
||||
if (_function) {
|
||||
const std::vector<properties::PropertyOwner*>& owners = _function();
|
||||
std::vector<properties::PropertyOwner*> owners = _function();
|
||||
std::sort(
|
||||
owners.begin(),
|
||||
owners.end(),
|
||||
[](properties::PropertyOwner* lhs, properties::PropertyOwner* rhs) {
|
||||
return lhs->name() < rhs->name();
|
||||
}
|
||||
);
|
||||
|
||||
for (properties::PropertyOwner* pOwner : owners) {
|
||||
if (pOwner->propertiesRecursive().empty())
|
||||
|
||||
Reference in New Issue
Block a user