forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user