File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -525,6 +525,8 @@ def _update_shown_columns(self):
525525 for section in range (1 , model .columnCount ()):
526526 col_name = model .horizontalHeaderItem (section ).data (Qt .DisplayRole )
527527 header .setSectionHidden (section , col_name not in self .shown_scores )
528+ self .view .resizeColumnsToContents ()
529+ self ._update_stats_model () # updates warnings for displayed columns
528530
529531 def _update_stats_model (self ):
530532 # Update the results_model with up to date scores.
@@ -583,13 +585,14 @@ def _update_stats_model(self):
583585 stats = slot .stats
584586
585587 if stats is not None :
586- for stat in stats :
588+ for stat , scorer in zip ( stats , self . scorers ) :
587589 item = QStandardItem ()
588590 if stat .success :
589591 item .setText ("{:.3f}" .format (stat .value [0 ]))
590592 else :
591593 item .setToolTip (str (stat .exception ))
592- has_missing_scores = True
594+ if scorer .name in self .shown_scores :
595+ has_missing_scores = True
593596 row .append (item )
594597
595598 model .appendRow (row )
You can’t perform that action at this time.
0 commit comments