}
// virtual
+/** Zoom or move viewport on mousewheel
+ *
+ * If mousewheel+Ctrl, zooms in/out on the timeline.
+ *
+ * With Ctrl, moves viewport towards end of timeline if down/back,
+ * opposite on up/forward.
+ *
+ * See also http://www.kdenlive.org/mantis/view.php?id=265 */
void CustomTrackView::wheelEvent(QWheelEvent * e) {
if (e->modifiers() == Qt::ControlModifier) {
if (e->delta() > 0) emit zoomIn();
else emit zoomOut();
} else {
- if (e->delta() > 0) horizontalScrollBar()->setValue(horizontalScrollBar()->value() + horizontalScrollBar()->singleStep());
+ if (e->delta() <= 0) horizontalScrollBar()->setValue(horizontalScrollBar()->value() + horizontalScrollBar()->singleStep());
else horizontalScrollBar()->setValue(horizontalScrollBar()->value() - horizontalScrollBar()->singleStep());
}
}
// virtual
+/** Move to other position on mousewheel
+ *
+ * Moves towards end of clip/timeline on mousewheel down/back,
+ * opposite for mousewheel up/forward.
+ *
+ * Ctrl+wheel moves single frame, without Ctrl moves a second.
+ *
+ * See also http://www.kdenlive.org/mantis/view.php?id=265 */
void Monitor::wheelEvent(QWheelEvent * event) {
if (event->modifiers() == Qt::ControlModifier) {
int delta = m_monitorManager->timecode().fps();
if (event->delta() < 0) delta = 0 - delta;
- slotSeek(m_position + delta);
+ slotSeek(m_position - delta);
} else {
- if (event->delta() > 0) slotForwardOneFrame();
+ if (event->delta() <= 0) slotForwardOneFrame();
else slotRewindOneFrame();
}
}