From fc9ad36e407454528ad2ab3cfbe8e4d5483991d1 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Thu, 17 Sep 2020 10:14:28 +0200 Subject: [PATCH] QmlDesigner: Add GridView to ListModelEditor We could simply test for the model property but this can lead to strange behaviour. Change-Id: I4e326890fb02d312b5210089c957dce026a09f94 Reviewed-by: Thomas Hartmann --- .../components/componentcore/designeractionmanager.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp index b1aaeb3fe77..014fc2d4596 100644 --- a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp +++ b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp @@ -368,8 +368,10 @@ public: static bool isListViewInBaseState(const SelectionContext &selectionState) { return selectionState.isInBaseState() && selectionState.singleNodeIsSelected() - && selectionState.currentSingleSelectedNode().metaInfo().isSubclassOf( - "QtQuick.ListView"); + && (selectionState.currentSingleSelectedNode().metaInfo().isSubclassOf( + "QtQuick.ListView") + || selectionState.currentSingleSelectedNode().metaInfo().isSubclassOf( + "QtQuick.GridView")); } bool isEnabled(const SelectionContext &) const override { return true; }