Skip to content

[FIX] canvas/toolgrid: Remove (unused) mouse press event tracking#1740

Merged
janezd merged 2 commits intobiolab:masterfrom
ales-erjavec:canvas/toolgrid-fix
Nov 11, 2016
Merged

[FIX] canvas/toolgrid: Remove (unused) mouse press event tracking#1740
janezd merged 2 commits intobiolab:masterfrom
ales-erjavec:canvas/toolgrid-fix

Conversation

@ales-erjavec
Copy link
Contributor

Issue

Under some circumstances a MouseRelease event could be delivered without a preceding MousePress event causing a AttributeError: 'NoneType' object has no attribute 'underMouse' in the ToolButtonEventListener.eventFilter

Description of changes

Remove the ToolButtonEventListener altogether as the mouse press tracking was not even used.
Parts that were needed were merged into the ToolGrid class itself.

Includes
  • Code changes
  • Tests
  • Documentation

@codecov-io
Copy link

codecov-io commented Nov 10, 2016

Current coverage is 88.87% (diff: 100%)

Merging #1740 into master will not change coverage

@@             master      #1740   diff @@
==========================================
  Files            82         82          
  Lines          8819       8819          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits           7838       7838          
  Misses          981        981          
  Partials          0          0          

Sunburst

Powered by Codecov. Last update 7e5556c...163b5ab

Fix an `AttributeError: 'NoneType' object has no attribute 'underMouse'`
in the `ToolButtonEventListener.eventFilter`. The mouse press tracking
was not even used so the class was removed, merging the parts that were
used into `ToolGrid` itself.
@janezd janezd merged commit 909a119 into biolab:master Nov 11, 2016
@ales-erjavec ales-erjavec deleted the canvas/toolgrid-fix branch January 27, 2017 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants