From ff891e31327fe912144d9bcb9a857c04cecc3af7 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 19 Nov 2021 11:22:23 +0200 Subject: [PATCH] QmlDesigner: Don't enable position or layout menu if no content Changed node position and layout context menu enabled checks to correspond to checks that are used to determine the enabled state of their contents. Fixes: QDS-5483 Change-Id: I71a26ffce9cc12036397b62658a08d9895f7cb63 Reviewed-by: Mahmoud Badri Reviewed-by: Qt CI Bot --- .../components/componentcore/designeractionmanager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp index d9a67a8400f..13774c12651 100644 --- a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp +++ b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp @@ -892,14 +892,14 @@ bool isPositioner(const SelectionContext &context) bool layoutOptionVisible(const SelectionContext &context) { - return multiSelectionAndInBaseState(context) + return selectionCanBeLayoutedAndQtQuickLayoutPossible(context) || singleSelectionAndInQtQuickLayout(context) || isLayout(context); } bool positionOptionVisible(const SelectionContext &context) { - return multiSelectionAndInBaseState(context) + return selectionCanBeLayouted(context) || isPositioner(context); }