Sequencer - Fixed zoom to beginning

Caused a crash due to startPos being negative
This commit is contained in:
Emmanuel BENOîT 2017-11-30 06:59:36 +01:00
parent 551bd56982
commit 6bae9ca7a4

View file

@ -799,7 +799,7 @@ void T_SyncViewImpl_::sequencerWidget( ) noexcept
diff{ zMax - zMin };
if ( diff > 4 ) {
const float u( sync.durationUnits( ) );
startPos = zMin * u / totalPixels;
startPos = ImClamp( zMin * u / totalPixels , 0.f , u );
if ( ( width - 2.f ) / u >= BarWidth ) {
zoomLevel = 0;
} else {