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);
|
return context.view()->model()->isImportPossible(import, true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool studioComponentsAvailableAndSelectionCanBeLayouted(const SelectionContext &context)
|
||||||
|
{
|
||||||
|
return selectionCanBeLayouted(context) && studioComponentsAvailable(context);
|
||||||
|
}
|
||||||
|
|
||||||
bool singleSelectedAndUiFile(const SelectionContext &context)
|
bool singleSelectedAndUiFile(const SelectionContext &context)
|
||||||
{
|
{
|
||||||
if (!singleSelection(context))
|
if (!singleSelection(context))
|
||||||
@@ -1042,7 +1047,7 @@ void DesignerActionManager::createDefaultDesignerActions()
|
|||||||
addDesignerAction(new ActionGroup(groupCategoryDisplayName,
|
addDesignerAction(new ActionGroup(groupCategoryDisplayName,
|
||||||
groupCategory,
|
groupCategory,
|
||||||
priorityGroupCategory,
|
priorityGroupCategory,
|
||||||
&studioComponentsAvailable));
|
&studioComponentsAvailableAndSelectionCanBeLayouted));
|
||||||
|
|
||||||
addDesignerAction(new ActionGroup(
|
addDesignerAction(new ActionGroup(
|
||||||
flowCategoryDisplayName,
|
flowCategoryDisplayName,
|
||||||
|
Reference in New Issue
Block a user