mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 08:09:32 +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)
|
void AudacityProject::SetHorizontalThumb(double scrollto)
|
||||||
{
|
{
|
||||||
wxInt64 max = mHsbar->GetRange() - mHsbar->GetThumbSize();
|
wxInt64 max = mHsbar->GetRange() - mHsbar->GetThumbSize();
|
||||||
int pos = std::min(max, std::max(wxInt64(0), PixelWidthBeforeTime(scrollto)));
|
int pos = std::min(max,
|
||||||
mHsbar->SetThumbPosition(pos * mViewInfo.sbarScale);
|
std::max(wxInt64(0),
|
||||||
|
wxInt64(PixelWidthBeforeTime(scrollto) * mViewInfo.sbarScale)));
|
||||||
|
mHsbar->SetThumbPosition(pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user