Sequencer - Mouse wheel zooming

This commit is contained in:
Emmanuel BENOîT 2017-11-21 16:12:24 +01:00
parent 5916e9f61c
commit a61f573d96

View file

@ -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( ) );