mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-04 17:49:45 +02:00
Fix assertion due to adjustment value being zero
wx3 on OSX has changed how the mouse wheel delta is calculated. Prior to wx3, it was simply set to 1 so the wheel rotaion value was simply increments of one. With wx3, higher resolution devices (like touchpads) are supported so the value for wheel rotation can be a fraction of the delta, so it is possible to pass a zero value to the NumericConverter::Adjust() method. Therefore, the method just returns in this case.
This commit is contained in:
parent
6d25c04af5
commit
62491cb769
@ -1019,6 +1019,12 @@ void NumericConverter::Decrement()
|
||||
|
||||
void NumericConverter::Adjust(int steps, int dir)
|
||||
{
|
||||
// It is possible and "valid" for steps to be zero if a
|
||||
// high precision device is being used and wxWidgets supports
|
||||
// reporting a higher precision...Mac wx3 does.
|
||||
if (steps == 0)
|
||||
return;
|
||||
|
||||
wxASSERT(dir == -1 || dir == 1);
|
||||
wxASSERT(steps > 0);
|
||||
if (steps < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user