Skip to content

Commit badcc39

Browse files
committed
hotkey input bugfix
1 parent 5859c75 commit badcc39

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/UI/popups/hotkeyInput.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,13 @@ class HotkeyInputDialog {
4747

4848
_onControllerData(int code, int? sliderValue, String name) {
4949
if (_sliderMode) {
50-
if (_invert) sliderValue = 127 - sliderValue!;
50+
if (sliderValue == null) return;
51+
if (_invert) sliderValue = 127 - sliderValue;
5152
code &= 0xffffff00;
5253
if (code == _previousCode && previousSliderValue != sliderValue) {
5354
//valid adjustment
5455
name = name.substring(0, name.length - 2);
55-
name += sliderValue!.toRadixString(16).padLeft(2, '0');
56+
name += sliderValue.toRadixString(16).padLeft(2, '0');
5657
controller.text = name;
5758
_hotkeyCode = code;
5859
}

0 commit comments

Comments
 (0)