You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have an issue with disabled items in RoundedToolbars unexpectedly generating SelectionEvents. Seems to us that it doesn't make sense for them to do so, no? A disabled item shouldn't generated these when clicked, surely?
You can disable the RoundedToolbar and no SelectionEvents are generated at all. Looks like calling setEnabled on RoundedToolItem only affects the image displayed.
Fix seems simple, RoundedToolbar:136: if (item.getBounds().contains(event.x, event.y)) {
change to: if (item.getBounds().contains(event.x, event.y) && item.isEnabled()) {
Could also move the check inside the if() instead and have it escape the for() loop, as an optimisation.
Thanks,
Justin
The text was updated successfully, but these errors were encountered:
swtdev
added a commit
to swtdev/opal
that referenced
this issue
Jan 24, 2018
Hi Laurent,
We have an issue with disabled items in RoundedToolbars unexpectedly generating SelectionEvents. Seems to us that it doesn't make sense for them to do so, no? A disabled item shouldn't generated these when clicked, surely?
You can disable the RoundedToolbar and no SelectionEvents are generated at all. Looks like calling setEnabled on RoundedToolItem only affects the image displayed.
Fix seems simple, RoundedToolbar:136:
if (item.getBounds().contains(event.x, event.y)) {
change to:
if (item.getBounds().contains(event.x, event.y) && item.isEnabled()) {
Could also move the check inside the if() instead and have it escape the for() loop, as an optimisation.
Thanks,
Justin
The text was updated successfully, but these errors were encountered: