diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2019-08-29 14:16:40 +0200 |
---|---|---|
committer | Thomas Hartmann <thomas.hartmann@qt.io> | 2019-08-29 12:54:27 +0000 |
commit | b1f54536ba882c75251a3f8f5844b4338fbb4fc8 (patch) | |
tree | 674881cf62c5d285fa7c43978a6c8ca283f491cf | |
parent | 5d706eff7ef539a28faf61ccb413ee41caab1d55 (diff) |
QmlDesigner: Make AnimationCurveDialog a normal modal dialog
QDialog::open() opens the dialog as a modal dialog.
Since no dialog parent was set the dialog did not
block any parent windows.
In this patch we set Core::ICore::dialogParent as the parent
and use show() instead of open().
The dialog is not modal anymore and Qt Creator is the proper parent window.
Therefore Qt::WindowStaysOnTopHint is not required anymore.
Change-Id: Iea48a73e67de5e9d2568e71145d57d0ffd0df78b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
-rw-r--r-- | src/plugins/qmldesigner/components/timelineeditor/animationcurvedialog.cpp | 2 | ||||
-rw-r--r-- | src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/qmldesigner/components/timelineeditor/animationcurvedialog.cpp b/src/plugins/qmldesigner/components/timelineeditor/animationcurvedialog.cpp index abc7778125..08269f0a92 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/animationcurvedialog.cpp +++ b/src/plugins/qmldesigner/components/timelineeditor/animationcurvedialog.cpp @@ -33,7 +33,6 @@ AnimationCurveDialog::AnimationCurveDialog(QWidget *parent) : QDialog(parent) , m_editor(nullptr) { - setWindowFlag(Qt::WindowStaysOnTopHint, true); setWindowFlag(Qt::WindowContextHelpButtonHint, false); } @@ -41,7 +40,6 @@ AnimationCurveDialog::AnimationCurveDialog(DesignTools::CurveEditorModel *model, : QDialog(parent) , m_editor(nullptr) { - setWindowFlag(Qt::WindowStaysOnTopHint, true); setWindowFlag(Qt::WindowContextHelpButtonHint, false); setModel(model); } diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp index 33c6dafa34..6e6ae34e43 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp +++ b/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp @@ -40,6 +40,7 @@ #include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/actionmanager/command.h> +#include <coreplugin/icore.h> #include <utils/algorithm.h> @@ -101,7 +102,7 @@ QAction *createAction(const Core::Id &id, TimelineToolBar::TimelineToolBar(QWidget *parent) : QToolBar(parent) , m_grp() - , m_dialog() + , m_dialog(Core::ICore::dialogParent()) , m_curveModel(new AnimationCurveEditorModel(0., 500.)) { m_dialog.setModel(m_curveModel); @@ -221,7 +222,7 @@ void TimelineToolBar::removeTimeline(const QmlTimeline &timeline) void TimelineToolBar::openAnimationCurveEditor() { - m_dialog.open(); + m_dialog.show(); } void TimelineToolBar::updateCurve(DesignTools::PropertyTreeItem *item) |