Keyframe view zoom bar: don't allow invalid size (x > y)

parent 0790a27e
Pipeline #21094 passed with stage
in 9 minutes and 47 seconds
......@@ -238,12 +238,12 @@ void KeyframeView::mouseMoveEvent(QMouseEvent *event)
if (m_hoverZoomIn || m_hoverZoomOut || m_hoverZoom) {
// Moving zoom handles
if (m_hoverZoomIn) {
m_zoomHandle.setX(qMax(0., (double)(event->x() - m_offset) / (width() - 2 * m_offset)));
m_zoomHandle.setX(qMin(qMax(0., (double)(event->x() - m_offset) / (width() - 2 * m_offset)), m_zoomHandle.y() - 0.015));
update();
return;
}
if (m_hoverZoomOut) {
m_zoomHandle.setY(qMin(1., (double)(event->x() - m_offset) / (width() - 2 * m_offset)));
m_zoomHandle.setY(qMax(qMin(1., (double)(event->x() - m_offset) / (width() - 2 * m_offset)), m_zoomHandle.x() + 0.015));
update();
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment