mirror of https://github.com/odrling/Aegisub
Fixed horizontal zoom in audio
Originally committed to SVN as r161.
This commit is contained in:
parent
718cfb17f1
commit
01d0916b2a
|
@ -692,12 +692,15 @@ void AudioDisplay::SetSamplesPercent(int percent,bool update,float pivot) {
|
|||
if (update) {
|
||||
// Center scroll
|
||||
int oldSamples = samples;
|
||||
UpdateSamples();
|
||||
PositionSample += (oldSamples-samples)*w*pivot;
|
||||
if (PositionSample < 0) PositionSample = 0;
|
||||
|
||||
// Update
|
||||
UpdateSamples();
|
||||
UpdateScrollbar();
|
||||
UpdateImage();
|
||||
Refresh(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue