mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-15 15:49:36 +02:00
bug1197 again: better fix
This commit is contained in:
parent
8d5841331b
commit
4e335af91f
@ -1528,8 +1528,10 @@ wxInt64 AudacityProject::PixelWidthBeforeTime(double scrollto) const
|
||||
void AudacityProject::SetHorizontalThumb(double scrollto)
|
||||
{
|
||||
wxInt64 max = mHsbar->GetRange() - mHsbar->GetThumbSize();
|
||||
int pos = std::min(max, std::max(wxInt64(0), PixelWidthBeforeTime(scrollto)));
|
||||
mHsbar->SetThumbPosition(pos * mViewInfo.sbarScale);
|
||||
int pos = std::min(max,
|
||||
std::max(wxInt64(0),
|
||||
wxInt64(PixelWidthBeforeTime(scrollto) * mViewInfo.sbarScale)));
|
||||
mHsbar->SetThumbPosition(pos);
|
||||
}
|
||||
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user