diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml index 4aabebf1b0b..a353d9fec53 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml @@ -146,6 +146,12 @@ Rectangle { tooltip: qsTr("Toggles whether this item is exported as an alias property of the root item.") } } + Item { //dummy object to preserve layout in case of multiselection + Layout.preferredWidth: 20 + Layout.preferredHeight: 20 + enabled: modelNodeBackend.multiSelection + visible: enabled + } } Label { @@ -154,13 +160,11 @@ Rectangle { SecondColumnLayout { enabled: !modelNodeBackend.multiSelection - visible: enabled spacing: 2 LineEdit { id: annotationEdit - enabled: annotationEditor.hasAuxData - visible: enabled + visible: annotationEditor.hasAuxData backendValue: backendValues.customId__AUX placeholderText: qsTr("customId") @@ -176,8 +180,8 @@ Rectangle { StudioControls.AbstractButton { id: editAnnotationButton - enabled: annotationEditor.hasAuxData - visible: enabled + visible: annotationEditor.hasAuxData + Layout.preferredWidth: 22 Layout.preferredHeight: 22 width: 22 @@ -185,14 +189,13 @@ Rectangle { buttonIcon: StudioTheme.Constants.edit onClicked: annotationEditor.showWidget() - onHoveredChanged: annotationEditor.checkAux() } StudioControls.AbstractButton { id: removeAnnotationButton - enabled: annotationEditor.hasAuxData - visible: enabled + visible: annotationEditor.hasAuxData + Layout.preferredWidth: 22 Layout.preferredHeight: 22 width: 22 @@ -200,14 +203,12 @@ Rectangle { buttonIcon: StudioTheme.Constants.closeCross onClicked: annotationEditor.removeFullAnnotation() - onHoveredChanged: annotationEditor.checkAux() } StudioControls.AbstractButton { id: addAnnotationButton - enabled: !annotationEditor.hasAuxData - visible: enabled + visible: !annotationEditor.hasAuxData buttonIcon: qsTr("Add Annotation") iconFont: StudioTheme.Constants.font @@ -223,8 +224,7 @@ Rectangle { Item { Layout.preferredWidth: 22 Layout.preferredHeight: 22 - enabled: !annotationEditor.hasAuxData - visible: enabled + visible: !annotationEditor.hasAuxData } AnnotationEditor { diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorannotationicon.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorannotationicon.cpp index 91b67b3dd27..c8717541d7d 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorannotationicon.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditorannotationicon.cpp @@ -261,7 +261,6 @@ void FormEditorAnnotationIcon::drawReader() ++currentColumn; newPos = commentsStartPosition + QPointF(currentColumn * (offset + width), 0); - } else { //few normal comments, lets stack them }