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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user