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