aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp')
-rw-r--r--src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp b/src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp
index 5b4e6e3cfb..8ab71ace97 100644
--- a/src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp
+++ b/src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp
@@ -83,6 +83,8 @@ GraphicsView::GraphicsView(CurveEditorModel *model, QWidget *parent)
connect(&m_dialog, &CurveEditorStyleDialog::styleChanged, this, &GraphicsView::setStyle);
+ connect(m_scene, &GraphicsScene::curveMessage, m_model, &CurveEditorModel::setStatusLineMsg);
+
auto itemSlot = [this](unsigned int id, const AnimationCurve &curve) {
m_model->setCurve(id, curve);
applyZoom(m_zoomX, m_zoomY);
@@ -560,7 +562,14 @@ void GraphicsView::applyZoom(double x, double y, const QPoint &pivot)
scrollContent(mapTimeToX(deltaTransformed.x()), mapValueToY(deltaTransformed.y()));
}
+ for (auto *curve : m_scene->curves()) {
+ if (curve->valueType() == AnimationCurve::ValueType::Bool) {
+ curve->remapValue(minValue, maxValue);
+ }
+ }
+
m_scene->doNotMoveItems(false);
+ this->update();
}
void GraphicsView::drawGrid(QPainter *painter)