mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-08 08:01:19 +02:00
Disable scrollwheel when there are no tracks. (Used to change the time ruler.)
This commit is contained in:
parent
2c7c0eb0b6
commit
e9830e727b
@ -6196,6 +6196,12 @@ void TrackPanel::HandleResize(wxMouseEvent & event)
|
||||
/// Handle mouse wheel rotation (for zoom in/out, vertical and horizontal scrolling)
|
||||
void TrackPanel::HandleWheelRotation(wxMouseEvent & event)
|
||||
{
|
||||
if (GetTracks()->IsEmpty())
|
||||
// Scrolling and Zoom in and out commands are disabled when there are no tracks.
|
||||
// This should be disabled too for consistency. Otherwise
|
||||
// you do see changes in the time ruler.
|
||||
return;
|
||||
|
||||
double steps = event.m_wheelRotation /
|
||||
(event.m_wheelDelta > 0 ? (double)event.m_wheelDelta : 120.0);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user