Skip to content

Commit

Permalink
Merge branch 'develop' into plot_ext_source
Browse files Browse the repository at this point in the history
  • Loading branch information
paulromano committed Jun 19, 2024
2 parents 70181c0 + 293067c commit affd307
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
3 changes: 2 additions & 1 deletion openmc_plotter/docks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 6 additions & 8 deletions openmc_plotter/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def loadGui(self, use_settings_pkl=True):
# Dock
self.dock = DomainDock(self.model, self.font_metric, self)
self.dock.setObjectName("Domain Options Dock")
self.addDockWidget(QtCore.Qt.RightDockWidgetArea, self.dock)
self.addDockWidget(QtCore.Qt.LeftDockWidgetArea, self.dock)

# Tally Dock
self.tallyDock = TallyDock(self.model, self.font_metric, self)
Expand All @@ -97,9 +97,12 @@ def loadGui(self, use_settings_pkl=True):

# Tools
self.exportDataDialog = ExportDataDialog(self.model, self.font_metric, self)

self.sourceSitesDialog = SourceSitesDialog(self.model, self.font_metric, self)

# Keyboard overlay
self.shortcutOverlay = ShortcutsOverlay(self)
self.shortcutOverlay.hide()

# Restore Window Settings
self.restoreWindowSettings()

Expand All @@ -112,10 +115,6 @@ def loadGui(self, use_settings_pkl=True):
self.statusBar().addPermanentWidget(self.coord_label)
self.coord_label.hide()

# Keyboard overlay
self.shortcutOverlay = ShortcutsOverlay(self)
self.shortcutOverlay.hide()

# Load Plot
self.statusBar().showMessage('Generating Plot...')
self.dock.updateDock()
Expand Down Expand Up @@ -535,7 +534,6 @@ def loadViewFile(self, filename):
saved = {'version': None,
'current': None}

print(saved['current'])
if saved['version'] == self.model.version:
self.model.activeView = saved['current']
self.dock.updateDock()
Expand Down Expand Up @@ -1092,7 +1090,7 @@ def restoreWindowSettings(self):
settings = QtCore.QSettings()

self.resize(settings.value("mainWindow/Size",
QtCore.QSize(800, 600)))
QtCore.QSize(1200, 800)))
self.move(settings.value("mainWindow/Position",
QtCore.QPoint(100, 100)))
self.restoreState(settings.value("mainWindow/State"))
Expand Down
2 changes: 1 addition & 1 deletion openmc_plotter/plotmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,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
Expand Down

0 comments on commit affd307

Please sign in to comment.