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] oweditdomain: Fix an IndexError when all rows are deselected #3183

Merged
merged 1 commit into from
Aug 3, 2018

Conversation

ales-erjavec
Copy link
Contributor

Issue

'Edit Domain' widget raises a:

---------------------------- IndexError Exception -----------------------------
Traceback (most recent call last):
  File "/Users/aleserjavec/workspace/orange3/Orange/widgets/data/oweditdomain.py", line 425, in on_value_selection_changed
    i = self.values_edit.selectionModel().selectedRows()[0].row()
IndexError: list index out of range
-------------------------------------------------------------------------------

... when editing a discrete variable and the current item in the 'Values' list view is deselected (via a Ctrl + mouse click or when selecting a different variable to edit in the left 'Domain Features' view.

Description of changes

Check for an empty selection.

Includes
  • Code changes
  • Tests
  • Documentation

@lanzagar lanzagar added this to the 3.15 milestone Aug 3, 2018
@codecov-io
Copy link

Codecov Report

Merging #3183 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #3183      +/-   ##
==========================================
+ Coverage   82.63%   82.64%   +<.01%     
==========================================
  Files         340      340              
  Lines       58790    58802      +12     
==========================================
+ Hits        48579    48594      +15     
+ Misses      10211    10208       -3

@lanzagar lanzagar merged commit 044fb36 into biolab:master Aug 3, 2018
@ales-erjavec ales-erjavec deleted the fixes/oweditdomain-check-rows branch September 12, 2018 10:09
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.

4 participants