diff --git a/mantidimaging/gui/windows/spectrum_viewer/model.py b/mantidimaging/gui/windows/spectrum_viewer/model.py index 33ae8c86f5a..1eab85c63e2 100644 --- a/mantidimaging/gui/windows/spectrum_viewer/model.py +++ b/mantidimaging/gui/windows/spectrum_viewer/model.py @@ -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: """ diff --git a/mantidimaging/gui/windows/spectrum_viewer/presenter.py b/mantidimaging/gui/windows/spectrum_viewer/presenter.py index 7eec3021252..380f06387f5 100644 --- a/mantidimaging/gui/windows/spectrum_viewer/presenter.py +++ b/mantidimaging/gui/windows/spectrum_viewer/presenter.py @@ -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: