-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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] OWRank: Select Attributes fixes and improvements #3084
Conversation
Loading the manually selected rows from context settings doesn't work. Method autoSelection doesn't seem to successfully select the rows in the view's selection model. As a consequence, on_select overwrites the selected_rows with an empty list. |
Codecov Report
@@ Coverage Diff @@
## master #3084 +/- ##
==========================================
+ Coverage 82.42% 82.43% +0.01%
==========================================
Files 335 335
Lines 58037 58105 +68
==========================================
+ Hits 47838 47901 +63
- Misses 10199 10204 +5 |
Try diff --git a/Orange/widgets/data/owrank.py b/Orange/widgets/data/owrank.py
index 83436d3ae..c0a009ff8 100644
--- a/Orange/widgets/data/owrank.py
+++ b/Orange/widgets/data/owrank.py
@@ -339,7 +339,7 @@ class OWRank(OWWidget):
self.selectionMethod = OWRank.SelectNBest
self.openContext(data)
- self.setSelectionMethod(self.selectionMethod)
+ self.selectButtons.button(self.selectionMethod).setChecked(True)
def handleNewSignals(self):
self.setStatusMessage('Running')
|
Orange/widgets/data/owrank.py
Outdated
@@ -523,9 +523,6 @@ def commit(self): | |||
selected_attrs = [] | |||
if self.data is not None: | |||
attributes = self.data.domain.attributes | |||
if len(attributes) == len(self.selected_rows): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can delete the row above as well and use the long version below (it is now only used once)
While fixing this, could you also change it so that commit is only called once. |
Includes