mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-19 06:07:42 +02:00
Fix for bug 791.
This commit is contained in:
parent
1dfbe5974e
commit
7c3f355c7a
@ -1004,7 +1004,7 @@ void TrackArtist::DrawWaveformBackground(wxDC &dc, const wxRect &r, const double
|
||||
|
||||
l = r.x + lx;
|
||||
w = x - lx;
|
||||
if (lmaxbot != lmintop - 1) {
|
||||
if (lmaxbot < lmintop - 1) {
|
||||
dc.DrawRectangle(l, r.y + lmaxtop, w, lmaxbot - lmaxtop);
|
||||
dc.DrawRectangle(l, r.y + lmintop, w, lminbot - lmintop);
|
||||
}
|
||||
@ -1023,7 +1023,7 @@ void TrackArtist::DrawWaveformBackground(wxDC &dc, const wxRect &r, const double
|
||||
dc.SetBrush(lsel ? selectedBrush : unselectedBrush);
|
||||
l = r.x + lx;
|
||||
w = x - lx;
|
||||
if (lmaxbot != lmintop - 1) {
|
||||
if (lmaxbot < lmintop - 1) {
|
||||
dc.DrawRectangle(l, r.y + lmaxtop, w, lmaxbot - lmaxtop);
|
||||
dc.DrawRectangle(l, r.y + lmintop, w, lminbot - lmintop);
|
||||
}
|
||||
|
@ -4290,8 +4290,12 @@ void TrackPanel::HandleVZoomButtonUp( wxMouseEvent & event )
|
||||
else {
|
||||
c = 0.5*(min+max);
|
||||
l = (c - min);
|
||||
min = wxMax( -1.0, c - 2*l); // limit to +/-1 range
|
||||
max = wxMin( 1.0, c + 2*l);
|
||||
// limit to +/- 1 range unless already outside that range...
|
||||
float minRange = (min < -1) ? -2.0 : -1.0;
|
||||
float maxRange = (max > 1) ? 2.0 : 1.0;
|
||||
// and enforce vertical zoom limits.
|
||||
min = wxMin(maxRange - ZOOMLIMIT, wxMax(minRange, c - 2*l));
|
||||
max = wxMax(minRange + ZOOMLIMIT, wxMin(maxRange, c + 2*l));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user