Gui: Create a Property View submenu for expansion

The Property View's context menu has a submenu for property expansion
that allows you set the property expansion to default (remembers state),
to expand all and to collapse all.  Then there are toggles for
default/auto expand/auto collapse that always collapses or expands or
remembers the state.
This commit is contained in:
Pieter Hijma
2025-09-01 14:18:21 +02:00
parent 76e43efdc6
commit 8e1f983e37
3 changed files with 130 additions and 85 deletions

View File

@@ -85,15 +85,11 @@ PropertyView::PropertyView(QWidget *parent)
propertyEditorView = new Gui::PropertyEditor::PropertyEditor();
propertyEditorView->setObjectName(QStringLiteral("propertyEditorView"));
propertyEditorView->setAutomaticDocumentUpdate(_GetParam()->GetBool("AutoTransactionView", false));
propertyEditorView->setAutomaticExpand(_GetParam()->GetBool("AutoExpandView", false));
propertyEditorView->setAutomaticCollapse(_GetParam()->GetBool("AutoCollapseView", false));
tabs->addTab(propertyEditorView, tr("View"));
propertyEditorData = new Gui::PropertyEditor::PropertyEditor();
propertyEditorData->setObjectName(QStringLiteral("propertyEditorData"));
propertyEditorData->setAutomaticDocumentUpdate(_GetParam()->GetBool("AutoTransactionData", true));
propertyEditorData->setAutomaticExpand(_GetParam()->GetBool("AutoExpandData", false));
propertyEditorView->setAutomaticCollapse(_GetParam()->GetBool("AutoCollapseData", false));
tabs->addTab(propertyEditorData, tr("Data"));
int preferredTab = _GetParam()->GetInt("LastTabIndex", 1);