aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/components/timelineeditor
diff options
context:
space:
mode:
authorKnud Dollereder <knud.dollereder@qt.io>2019-11-29 16:12:16 +0100
committerKnud Dollereder <knud.dollereder@qt.io>2019-12-03 10:10:22 +0000
commit16bd822d1b600fadf01003f3cc1ac080956f672c (patch)
treef35d4fd6d75a1106b8aafdb38fd4537f26e08ba7 /src/plugins/qmldesigner/components/timelineeditor
parentfd39ea9ef9a6a4c8a19a0ad730f5ddfe22b0a1fe (diff)
Move selection related code into SelectionModel
And fix a bug where the curves where missing in the graphicsview after opening the AnimationCurveDialog a second time. Change-Id: I4f13bd345afafaa0578a3be28be6326fa232dbe1 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'src/plugins/qmldesigner/components/timelineeditor')
-rw-r--r--src/plugins/qmldesigner/components/timelineeditor/animationcurvedialog.cpp5
-rw-r--r--src/plugins/qmldesigner/components/timelineeditor/animationcurvedialog.h3
-rw-r--r--src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp1
3 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/qmldesigner/components/timelineeditor/animationcurvedialog.cpp b/src/plugins/qmldesigner/components/timelineeditor/animationcurvedialog.cpp
index 08269f0a92..2c4fb147b0 100644
--- a/src/plugins/qmldesigner/components/timelineeditor/animationcurvedialog.cpp
+++ b/src/plugins/qmldesigner/components/timelineeditor/animationcurvedialog.cpp
@@ -56,9 +56,10 @@ void AnimationCurveDialog::setModel(DesignTools::CurveEditorModel *model)
setLayout(layout);
}
-void AnimationCurveDialog::showEvent(QShowEvent *)
+void AnimationCurveDialog::refresh()
{
- m_editor->clearCanvas();
+ if (m_editor)
+ m_editor->clearCanvas();
}
} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/timelineeditor/animationcurvedialog.h b/src/plugins/qmldesigner/components/timelineeditor/animationcurvedialog.h
index a567adec78..1bb20a3174 100644
--- a/src/plugins/qmldesigner/components/timelineeditor/animationcurvedialog.h
+++ b/src/plugins/qmldesigner/components/timelineeditor/animationcurvedialog.h
@@ -42,8 +42,7 @@ public:
void setModel(DesignTools::CurveEditorModel *model);
-protected:
- void showEvent(QShowEvent *event) override;
+ void refresh();
private:
DesignTools::CurveEditor *m_editor;
diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp
index a233e19aad..4c4e1e38f0 100644
--- a/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp
+++ b/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp
@@ -232,6 +232,7 @@ void TimelineToolBar::openAnimationCurveEditor()
timeline = tlv->timelineForState(tlv->currentState());
}
+ m_dialog.refresh();
m_curveModel->setTimeline(timeline);
m_dialog.show();
}