From a61f573d965ef61378315007723bf2aafea35a13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Tue, 21 Nov 2017 16:12:24 +0100 Subject: [PATCH] Sequencer - Mouse wheel zooming --- syncview.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/syncview.cc b/syncview.cc index 95c5639..17a7aab 100644 --- a/syncview.cc +++ b/syncview.cc @@ -159,7 +159,9 @@ void T_SyncViewImpl_::sequencerWidget( ) noexcept } const bool active( GetCurrentContext( )->ActiveId == seqId ); - if ( active ) { + if ( hovered && !active && io.MouseWheel != 0 ) { + zoomLevel = ImSaturate( zoomLevel + .025 * io.MouseWheel ); + } else if ( active ) { if ( io.MouseDown[ 0 ] ) { const float p{ io.MousePos.x - bbAll.Min.x + startPixel }; auto& sync( Globals::Sync( ) );