QmlDesigner: Fix for Binding Editor launch pos

Task: QDS-1418

Change-Id: Id0c051d7187648a1477de70769fb7a47363ccdeb
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Aleksei German
2020-06-09 13:46:14 +02:00
parent 01b0d4f8f5
commit def4655042
6 changed files with 24 additions and 9 deletions

View File

@@ -56,7 +56,7 @@ void BindingEditor::registerDeclarativeType()
qmlRegisterType<BindingEditor>("HelperWidgets", 2, 0, "BindingEditor");
}
void BindingEditor::showWidget(int x, int y)
void BindingEditor::prepareDialog()
{
if (s_lastBindingEditor)
s_lastBindingEditor->hideWidget();
@@ -71,6 +71,17 @@ void BindingEditor::showWidget(int x, int y)
this, &BindingEditor::rejected);
m_dialog->setAttribute(Qt::WA_DeleteOnClose);
}
void BindingEditor::showWidget()
{
prepareDialog();
m_dialog->showWidget();
}
void BindingEditor::showWidget(int x, int y)
{
prepareDialog();
m_dialog->showWidget(x, y);
}