Commit 60a2dcc9 authored by Vitaliy Vashchenko's avatar Vitaliy Vashchenko

#854 fixed excessive disabling

parent 6fbfd849
...@@ -572,13 +572,15 @@ public class TablexiaButton extends Group { ...@@ -572,13 +572,15 @@ public class TablexiaButton extends Group {
} }
public TablexiaButton setEnabled(boolean enabled) { public TablexiaButton setEnabled(boolean enabled) {
this.enabled = enabled; if (this.enabled != enabled) {
if (enabled) { this.enabled = enabled;
registerInputListener(); if (enabled) {
setUnchecked(); registerInputListener();
} else { setUnchecked();
unregisterInputListener(); } else {
changeBackground(disabled, disabledPatch); unregisterInputListener();
changeBackground(disabled, disabledPatch);
}
} }
return this; return this;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment