forked from mia/Aegisub
Fixed horizontal zoom in audio
Originally committed to SVN as r161.
This commit is contained in:
parent
718cfb17f1
commit
01d0916b2a
1 changed files with 3 additions and 0 deletions
|
@ -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 a new issue