From 823dc5275bdea79e6af9c27852e8885445bb181e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Mon, 27 Nov 2017 18:42:08 +0100 Subject: [PATCH] Sequencer - Mouse wheel behaviour changed * Wheeling will scroll vertically * Shift+Wheeling will zoom in/out --- ui-sequencer.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ui-sequencer.cc b/ui-sequencer.cc index feee2d9..c045eb6 100644 --- a/ui-sequencer.cc +++ b/ui-sequencer.cc @@ -631,7 +631,13 @@ void T_SyncViewImpl_::sequencerWidget( ) noexcept return; } if ( io.MouseWheel != 0 ) { - zoomLevel = ImSaturate( zoomLevel + .025 * io.MouseWheel ); + if ( io.KeyShift ) { + zoomLevel = ImSaturate( zoomLevel + .025 * io.MouseWheel ); + } else { + vScroll = ImMax( 0.f , + ImMin( vScroll - 3.f * io.MouseWheel , + totalHeight - bbDisplay.GetHeight( ) ) ); + } } if ( bbDisplay.Contains( io.MousePos ) ) { displayTooltips( mTime );