diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2020-10-12 15:41:01 +0200 |
---|---|---|
committer | Thomas Hartmann <thomas.hartmann@qt.io> | 2020-10-12 14:03:30 +0000 |
commit | 9e064b158eff2dff4a0cb6ebf7b7e52bf4ddd86c (patch) | |
tree | de5cdbb1dcd44d2807277b3c601dc7e718301ce2 | |
parent | f60302591b08a739d4bfeaeacebbcb49411cb6bb (diff) |
QmlDesigner: Disable group menue if selection is empty
Change-Id: I1b64bbe7a6217ed08c8a1f72435cd67eea6209a0
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r-- | src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp index f7487d8a3f..2d9c19279c 100644 --- a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp +++ b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp @@ -828,6 +828,11 @@ bool studioComponentsAvailable(const SelectionContext &context) return context.view()->model()->isImportPossible(import, true, true); } +bool studioComponentsAvailableAndSelectionCanBeLayouted(const SelectionContext &context) +{ + return selectionCanBeLayouted(context) && studioComponentsAvailable(context); +} + bool singleSelectedAndUiFile(const SelectionContext &context) { if (!singleSelection(context)) @@ -1042,7 +1047,7 @@ void DesignerActionManager::createDefaultDesignerActions() addDesignerAction(new ActionGroup(groupCategoryDisplayName, groupCategory, priorityGroupCategory, - &studioComponentsAvailable)); + &studioComponentsAvailableAndSelectionCanBeLayouted)); addDesignerAction(new ActionGroup( flowCategoryDisplayName, |