1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-10 16:43:33 +02:00

Correct vertical ruler width recalculation for multiple sub-views...

... though not more than one is yet shown
This commit is contained in:
Paul Licameli
2019-07-10 23:50:07 -04:00
parent dd369da6a0
commit 54493f34a5

View File

@@ -931,15 +931,20 @@ void TrackPanel::UpdateTrackVRuler(Track *t)
auto iter = subViews.begin(), end = subViews.end(), next = iter;
auto yy = iter->first;
wxSize vRulerSize{ 0, 0 };
for ( ; iter != end; iter = next ) {
++next;
auto nextY = ( next == end )
? height
: next->first;
rect.SetHeight( nextY - yy );
// This causes ruler size in the track to be reassigned:
TrackVRulerControls::Get( *iter->second ).UpdateRuler( rect );
// But we want to know the maximum width and height over all sub-views:
vRulerSize.IncTo( t->vrulerSize );
yy = nextY;
}
t->vrulerSize = vRulerSize;
}
}