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>
This commit is contained in:
Thomas Hartmann
2020-10-12 15:41:01 +02:00
parent f60302591b
commit 9e064b158e

View File

@@ -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,