forked from qt-creator/qt-creator
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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user