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] owselectcolumns: Fix move up/down type error #4271

Merged

Conversation

ales-erjavec
Copy link
Contributor

Issue

Selecting a variable in the "Features" list and pressing Up/Down button (to the left of the view) triggers a:

Traceback (most recent call last):
  File "/Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Orange/widgets/data/owselectcolumns.py", line 436, in move_down
    self.move_rows(view, selected, 1)
  File "/Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Orange/widgets/data/owselectcolumns.py", line 416, in move_rows
    newrows = [min(max(0, row + offset), len(model) - 1) for row in rows]
  File "/Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Orange/widgets/data/owselectcolumns.py", line 416, in <listcomp>
    newrows = [min(max(0, row + offset), len(model) - 1) for row in rows]
TypeError: object of type 'VariableFilterProxyModel' has no len()
Description of changes

Use QAbstractItemModel API to exchange the variables..

Includes
  • Code changes
  • Tests
  • Documentation

@ales-erjavec ales-erjavec force-pushed the fixes/owselectcolumns-move-rows-proxy branch from 509a10f to ad202ae Compare December 17, 2019 11:10
@codecov
Copy link

codecov bot commented Dec 17, 2019

Codecov Report

Merging #4271 into master will increase coverage by 0.02%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #4271      +/-   ##
==========================================
+ Coverage   86.22%   86.24%   +0.02%     
==========================================
  Files         396      396              
  Lines       70706    70726      +20     
==========================================
+ Hits        60964    61000      +36     
+ Misses       9742     9726      -16

@janezd janezd self-assigned this Dec 19, 2019
@janezd janezd merged commit 0d04d81 into biolab:master Dec 20, 2019
@ales-erjavec ales-erjavec deleted the fixes/owselectcolumns-move-rows-proxy branch March 16, 2020 13:42
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