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) {
|
if (update) {
|
||||||
// Center scroll
|
// Center scroll
|
||||||
int oldSamples = samples;
|
int oldSamples = samples;
|
||||||
|
UpdateSamples();
|
||||||
PositionSample += (oldSamples-samples)*w*pivot;
|
PositionSample += (oldSamples-samples)*w*pivot;
|
||||||
if (PositionSample < 0) PositionSample = 0;
|
if (PositionSample < 0) PositionSample = 0;
|
||||||
|
|
||||||
// Update
|
// Update
|
||||||
|
UpdateSamples();
|
||||||
UpdateScrollbar();
|
UpdateScrollbar();
|
||||||
UpdateImage();
|
UpdateImage();
|
||||||
|
Refresh(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue