CurveEditor: Fix bounding rect computation for the graphicsscene

Task-number: QDS-2957
Change-Id: I0019d538e7460e923b35024bd02f7186e1935f6b
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Knud Dollereder
2020-10-16 16:45:44 +02:00
parent b771f400de
commit aaf564cab7
8 changed files with 56 additions and 10 deletions

View File

@@ -42,7 +42,7 @@ namespace QmlDesigner {
CurveEditorView::CurveEditorView(QObject *parent)
: AbstractView(parent)
, m_block(false)
, m_model(new DesignTools::CurveEditorModel(0., 500.))
, m_model(new DesignTools::CurveEditorModel())
, m_editor(new DesignTools::CurveEditor(m_model))
{
Q_UNUSED(parent);
@@ -267,7 +267,7 @@ ModelNode getTargetNode1(DesignTools::PropertyTreeItem *item, const QmlTimeline
QString targetId = nodeItem->name();
if (timeline.isValid()) {
for (auto &&target : timeline.allTargets()) {
if (target.displayName() == targetId)
if (target.isValid() && target.displayName() == targetId)
return target;
}
}