Commit 861098ef authored by Lan Zagar's avatar Lan Zagar

Merge pull request #1129 from astaric/fixups

[FIX] OWRank no longer crashes when additional learners are available
parents 2e8bb62e 16bfce7f
......@@ -259,6 +259,8 @@ class OWRank(widget.OWWidget):
shape = (len(self.measures) + len(self.learners), len(attrs))
self.measure_scores = table(shape, None)
self.updateScores()
else:
self.send("Scores", None)
self.selectMethodChanged()
self.commit()
......@@ -328,10 +330,7 @@ class OWRank(widget.OWWidget):
self.ranksProxyModel.invalidate()
self.selectMethodChanged()
if self.data:
self.send("Scores", self.create_scores_table())
else:
self.send("Scores", None)
self.send("Scores", self.create_scores_table())
def updateRankModel(self, measuresMask=None):
"""
......@@ -498,7 +497,8 @@ class OWRank(widget.OWWidget):
return []
def create_scores_table(self):
features = [ContinuousVariable(s[0]) for s in self.measures]
measures = self.measures + [v for k, v in self.learners.items()]
features = [ContinuousVariable(s[0]) for s in measures]
metas = [StringVariable("Feature name")]
domain = Domain(features, metas=metas)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment