Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions hexrdgui/hexrd_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -770,8 +770,11 @@ def emit_update_status_bar(self, msg: str) -> None:
self.update_status_bar.emit(msg)

def on_detectors_changed(self) -> None:
# Reset azimuthal lineout detectors
self._azimuthal_lineout_detectors = None
# Reset azimuthal lineout detectors, unless we are loading state
# (the saved state already has the correct lineout detectors for the
# saved instrument).
if not self.loading_state:
self._azimuthal_lineout_detectors = None

@property
def indexing_config(self) -> dict[str, Any]:
Expand Down
6 changes: 5 additions & 1 deletion hexrdgui/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -1528,7 +1528,11 @@ def on_action_save_state_triggered(self) -> None:
return

overwriting_last_loaded = False
if selected_file == HexrdConfig().last_loaded_state_file:
last_loaded = HexrdConfig().last_loaded_state_file
if (
last_loaded is not None
and Path(selected_file).resolve() == Path(last_loaded).resolve()
):
# We are over-writing the last loaded state file.
# We must save to a temp file to avoid over-writing the
# imageseries, which are already open...
Expand Down
Loading