Allow zooming to zones without end.

This commit is contained in:
Bartosz Taudul 2017-10-08 11:38:03 +02:00
parent 002a93e448
commit fbe7e59319

View File

@ -1927,9 +1927,10 @@ float View::GetZoneThickness( const Event& ev )
void View::ZoomToZone( const Event& ev ) void View::ZoomToZone( const Event& ev )
{ {
if( ev.end - ev.start <= 0 ) return; const auto end = GetZoneEnd( ev );
if( end - ev.start <= 0 ) return;
m_zvStartNext = ev.start; m_zvStartNext = ev.start;
m_zvEndNext = ev.end; m_zvEndNext = end;
} }
void View::ZoneTooltip( const Event& ev ) void View::ZoneTooltip( const Event& ev )