mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-28 16:20:12 +01:00
Cancel Snap-To if we are zooming in to sample level.
This commit is contained in:
@@ -89,6 +89,16 @@ bool ZoomInfo::ZoomOutAvailable() const
|
|||||||
void ZoomInfo::SetZoom(double pixelsPerSecond)
|
void ZoomInfo::SetZoom(double pixelsPerSecond)
|
||||||
{
|
{
|
||||||
zoom = std::max(gMinZoom, std::min(gMaxZoom, pixelsPerSecond));
|
zoom = std::max(gMinZoom, std::min(gMaxZoom, pixelsPerSecond));
|
||||||
|
// Disable snapping if user zooms in a long way.
|
||||||
|
// Helps stop users be trapped in snap-to.
|
||||||
|
// The level chosen is in sample viewing range with samples
|
||||||
|
// still quite close together.
|
||||||
|
if( zoom > (gMaxZoom * 0.06 ))
|
||||||
|
{
|
||||||
|
AudacityProject * project = GetActiveProject();
|
||||||
|
if( project )
|
||||||
|
project->OnSnapToOff();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZoomInfo::ZoomBy(double multiplier)
|
void ZoomInfo::ZoomBy(double multiplier)
|
||||||
|
|||||||
Reference in New Issue
Block a user