Fix the logic of toggleable buttons
This commit is contained in:
parent
b3201bfa3c
commit
ee163fe312
|
@ -41,8 +41,8 @@ class ClickButton(
|
||||||
if (it) {
|
if (it) {
|
||||||
if (!toggled) lightUp() else lightDown()
|
if (!toggled) lightUp() else lightDown()
|
||||||
if ((kind == Type.TOGGLE)) {
|
if ((kind == Type.TOGGLE)) {
|
||||||
if (toggled) execAction()
|
|
||||||
toggled = !toggled
|
toggled = !toggled
|
||||||
|
if (toggled) execAction()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue