diff options
author | Mahmoud Badri <mahmoud.badri@qt.io> | 2021-12-01 18:43:02 +0200 |
---|---|---|
committer | Mahmoud Badri <mahmoud.badri@qt.io> | 2021-12-03 11:35:17 +0000 |
commit | 0a8ab22f4129836641a3e063da239e30dc5eec7c (patch) | |
tree | 0a13720151324c2d4f4a1695baf2f3d688f141ef /src | |
parent | be059ac11a7e028c40fe94efee65e620b3ae0867 (diff) |
QmlDesigner: Fix states context menu not working in certain areas
Fixed 2 issues with the context menu:
- Left clicking the area to the right of the states doesn't close the
context menu. The issues seems to be a bug in the ListView, solved by
limiting the width of the ListView to the states area width.
- Clicking (left or right) below the states area doesn't work. This is
because the height of the states view was fixed to the height needed.
Solved by not restricting the view height and do necessary changes.
Also some cleanups and removing unnecessary stuff.
Fixes: QDS-5324
Change-Id: Ic1e3f5d0776bb4770a3276c93ad1aee7a0049388
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp b/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp index d94f21bd35..4701a4079e 100644 --- a/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp +++ b/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp @@ -168,12 +168,9 @@ void StatesEditorWidget::reloadQmlSource() connect(rootObject(), SIGNAL(createNewState()), m_statesEditorView.data(), SLOT(createNewState())); connect(rootObject(), SIGNAL(deleteState(int)), m_statesEditorView.data(), SLOT(removeState(int))); m_statesEditorView.data()->synchonizeCurrentStateFromWidget(); - setFixedHeight(initialSize().height()); - if (!DesignerSettings::getValue(DesignerSettingsKey::STATESEDITOR_EXPANDED).toBool()) { + if (!DesignerSettings::getValue(DesignerSettingsKey::STATESEDITOR_EXPANDED).toBool()) toggleStatesViewExpanded(); - setFixedHeight(rootObject()->height()); - } connect(rootObject(), SIGNAL(expandedChanged()), this, SLOT(handleExpandedChanged())); } @@ -184,7 +181,5 @@ void StatesEditorWidget::handleExpandedChanged() bool expanded = rootObject()->property("expanded").toBool(); DesignerSettings::setValue(DesignerSettingsKey::STATESEDITOR_EXPANDED, expanded); - - setFixedHeight(rootObject()->height()); } } |