Skip to content

Commit 89f8899

Browse files
committed
Hide warnings for hidden scores
1 parent ae89443 commit 89f8899

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Orange/widgets/evaluate/owtestlearners.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,7 @@ def _update_shown_columns(self):
526526
col_name = model.horizontalHeaderItem(section).data(Qt.DisplayRole)
527527
header.setSectionHidden(section, col_name not in self.shown_scores)
528528
self.view.resizeColumnsToContents()
529+
self._update_stats_model() # updates warnings for displayed columns
529530

530531
def _update_stats_model(self):
531532
# Update the results_model with up to date scores.
@@ -584,13 +585,13 @@ def _update_stats_model(self):
584585
stats = slot.stats
585586

586587
if stats is not None:
587-
for stat in stats:
588+
for stat, scorer in zip(stats, self.scorers):
588589
item = QStandardItem()
589590
if stat.success:
590591
item.setText("{:.3f}".format(stat.value[0]))
591592
else:
592593
item.setToolTip(str(stat.exception))
593-
has_missing_scores = True
594+
has_missing_scores = scorer.name in self.shown_scores
594595
row.append(item)
595596

596597
model.appendRow(row)

0 commit comments

Comments
 (0)