Skip to content

Commit

Permalink
Hide warnings for hidden scores
Browse files Browse the repository at this point in the history
  • Loading branch information
thocevar committed Mar 8, 2019
1 parent ae89443 commit 89f8899
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Orange/widgets/evaluate/owtestlearners.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@ def _update_shown_columns(self):
col_name = model.horizontalHeaderItem(section).data(Qt.DisplayRole)
header.setSectionHidden(section, col_name not in self.shown_scores)
self.view.resizeColumnsToContents()
self._update_stats_model() # updates warnings for displayed columns

def _update_stats_model(self):
# Update the results_model with up to date scores.
Expand Down Expand Up @@ -584,13 +585,13 @@ def _update_stats_model(self):
stats = slot.stats

if stats is not None:
for stat in stats:
for stat, scorer in zip(stats, self.scorers):
item = QStandardItem()
if stat.success:
item.setText("{:.3f}".format(stat.value[0]))
else:
item.setToolTip(str(stat.exception))
has_missing_scores = True
has_missing_scores = scorer.name in self.shown_scores
row.append(item)

model.appendRow(row)
Expand Down

0 comments on commit 89f8899

Please sign in to comment.