Skip to content

Commit

Permalink
fixing handle roi issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ashmeigh committed Dec 12, 2024
1 parent 921b228 commit 03ec3de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mantidimaging/gui/windows/spectrum_viewer/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def save_single_rits_spectrum(self, path: Path, error_mode: ErrorMode) -> None:
@param path: The path to save the CSV file to.
@param error_mode: Which version (standard deviation or propagated) of the error to use in the RITS export.
"""
self.save_rits_roi(path, error_mode, self._roi_ranges["ROI_RITS"])
self.save_rits_roi(path, error_mode, self._roi_ranges[ROI_RITS])

def save_rits_roi(self, path: Path, error_mode: ErrorMode, roi: SensibleROI, normalise: bool = False) -> None:
"""
Expand Down
9 changes: 6 additions & 3 deletions mantidimaging/gui/windows/spectrum_viewer/presenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,13 @@ def handle_roi_moved(self, force_new_spectrums: bool = False) -> None:
"""
for name in self.view.spectrum_widget.roi_dict:
current_roi = self.view.spectrum_widget.get_roi(name)
self.model.set_roi(name, current_roi)
if force_new_spectrums:
self.model.set_roi(name, current_roi)
spectrum = self.model.get_spectrum(current_roi, self.spectrum_mode,
self.view.shuttercount_norm_enabled())
spectrum = self.model.get_spectrum(
current_roi,
self.spectrum_mode,
self.view.shuttercount_norm_enabled(),
)
self.view.set_spectrum(name, spectrum)

def handle_roi_clicked(self, roi: SpectrumROI) -> None:
Expand Down

0 comments on commit 03ec3de

Please sign in to comment.