Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] schemeedit: Clear edit focus before removing items #2427

Merged

Conversation

ales-erjavec
Copy link
Contributor

Issue

When the canvas text annotation is selected and has edit focus, pressing (Control|Command) + Backspace raises an error

----------------------------- KeyError Exception ------------------------------
Traceback (most recent call last):
  File "/Users/aleserjavec/workspace/orange3/Orange/canvas/document/schemeedit.py", line 1339, in __onEditingFinished
    annot = self.__scene.annotation_for_item(item)
  File "/Users/aleserjavec/workspace/orange3/Orange/canvas/canvas/scene.py", line 618, in annotation_for_item
    return rev[item]
KeyError: <Orange.canvas.canvas.items.annotationitem.TextAnnotation object at 0x1246ee318>
-------------------------------------------------------------------------------
Description of changes

Clear item's keyboard focus before removing it.

Includes
  • Code changes
  • Tests
  • Documentation

@codecov-io
Copy link

Codecov Report

Merging #2427 into master will decrease coverage by 0.09%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master    #2427     +/-   ##
=========================================
- Coverage   74.31%   74.21%   -0.1%     
=========================================
  Files         320      320             
  Lines       55799    55799             
=========================================
- Hits        41468    41413     -55     
- Misses      14331    14386     +55

@janezd janezd merged commit e426359 into biolab:master Jun 23, 2017
@ales-erjavec ales-erjavec deleted the fixes/canvas/text-annotation-clear-focus branch June 27, 2017 13:14
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