diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml index 140f05c1071..2a724bd58de 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml @@ -39,6 +39,7 @@ PropertyEditorPane { DynamicPropertiesSection { propertiesModel: SelectionDynamicPropertiesModel {} + visible: !hasMultiSelection } GeometrySection {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick3D/Object3DPane.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick3D/Object3DPane.qml index f0261c7c753..5483ca67ac4 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick3D/Object3DPane.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick3D/Object3DPane.qml @@ -42,6 +42,7 @@ PropertyEditorPane { DynamicPropertiesSection { propertiesModel: SelectionDynamicPropertiesModel {} + visible: !hasMultiSelection } Loader { diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp index 8ba1325efaf..75c63159247 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp @@ -429,6 +429,20 @@ QQmlComponent *PropertyEditorContextObject::specificQmlComponent() return m_qmlComponent; } +bool PropertyEditorContextObject::hasMultiSelection() const +{ + return m_hasMultiSelection; +} + +void PropertyEditorContextObject::setHasMultiSelection(bool b) +{ + if (b == m_hasMultiSelection) + return; + + m_hasMultiSelection = b; + emit hasMultiSelectionChanged(); +} + void PropertyEditorContextObject::setSpecificsUrl(const QUrl &newSpecificsUrl) { if (newSpecificsUrl == m_specificsUrl) diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.h b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.h index 05ebe47ec28..fba0e4a66cb 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.h +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.h @@ -68,6 +68,9 @@ class PropertyEditorContextObject : public QObject Q_PROPERTY(QQmlComponent* specificQmlComponent READ specificQmlComponent NOTIFY specificQmlComponentChanged) + Q_PROPERTY(bool hasMultiSelection READ hasMultiSelection WRITE setHasMultiSelection NOTIFY + hasMultiSelectionChanged) + public: PropertyEditorContextObject(QObject *parent = nullptr); @@ -126,6 +129,10 @@ public: bool hasAliasExport() const { return m_aliasExport; } + bool hasMultiSelection() const; + + void setHasMultiSelection(bool); + signals: void specificsUrlChanged(); void specificQmlDataChanged(); @@ -142,6 +149,7 @@ signals: void hasAliasExportChanged(); void hasActiveTimelineChanged(); void activeDragSuffixChanged(); + void hasMultiSelectionChanged(); public slots: @@ -192,6 +200,8 @@ private: bool m_setHasActiveTimeline = false; QString m_activeDragSuffix; + + bool m_hasMultiSelection = false; }; class EasingCurveEditor : public QObject