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 <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Miikka Heikkinen
2021-11-19 11:22:23 +02:00
parent 73e30f782d
commit ff891e3132

View File

@@ -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);
}