Improve stability of the curve editor

- Clear the CurveEditor when deleting a timeline
- Prevent value-axis computation with invalid values
- Prevent invalid values when animation curves contain one keyframe only
- Set the dirty flag when deleting a keyframe in order to properly
  delete it
- Fix autoscrolling for the timeline editor

Fixes: QDS-4115
Fixes: QDS-4081
Fixes: QDS-4080
Fixes: QDS-3251
Change-Id: I3bc8406ac57f30b16bccc2e1c164a84502de7750
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Knud Dollereder
2021-04-20 15:11:14 +02:00
parent 357e70279c
commit d5daa1d0bb
9 changed files with 66 additions and 53 deletions

View File

@@ -101,6 +101,9 @@ void CurveEditorView::nodeRemoved(const ModelNode &removedNode,
ModelNode parent = parentProperty.parentModelNode();
if (dirtyfiesView(parent))
updateKeyframes();
if (!activeTimeline().isValid())
m_model->reset({});
}
void CurveEditorView::nodeReparented(const ModelNode &node,