diff --git a/openmc_plotter/docks.py b/openmc_plotter/docks.py index a9a5ce8..b1db673 100644 --- a/openmc_plotter/docks.py +++ b/openmc_plotter/docks.py @@ -404,7 +404,8 @@ def _createFilterTree(self, spatial_filters): 0, "Only tallies with spatial filters are viewable.") else: filter_item.setFlags( - filter_item.flags() | QtCore.Qt.ItemIsUserCheckable) + filter_item.flags() | QtCore.Qt.ItemIsUserCheckable | + QtCore.Qt.ItemIsAutoTristate) filter_item.setCheckState(0, QtCore.Qt.Unchecked) # all mesh bins are selected by default and not shown in the dock diff --git a/openmc_plotter/plotmodel.py b/openmc_plotter/plotmodel.py index a2c453b..b1d5068 100644 --- a/openmc_plotter/plotmodel.py +++ b/openmc_plotter/plotmodel.py @@ -1317,7 +1317,7 @@ def setData(self, index, value, role=Qt.EditRole): self.domains.set_masked(key, Qt.CheckState(value) == Qt.Checked) elif column == HIGHLIGHT: if role == Qt.CheckStateRole: - self.domains.set_highlight(Qt.CheckState(value) == Qt.Checked) + self.domains.set_highlight(key, Qt.CheckState(value) == Qt.Checked) self.dataChanged.emit(index, index) return True