Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2062 Spectrum Viewer ROI Desync Fix #2064

Merged
merged 2 commits into from
Feb 26, 2024
Merged
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
10 changes: 9 additions & 1 deletion mantidimaging/gui/windows/spectrum_viewer/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,12 @@ def on_visibility_change(self) -> None:
if self.presenter.export_mode == ExportMode.ROI_MODE:
if self.current_roi in self.old_table_names and self.last_clicked_roi in self.old_table_names:
pass
else:
elif self.current_roi == ROI_RITS and self.last_clicked_roi in self.old_table_names:
self.current_roi = self.last_clicked_roi
elif self.current_roi == ROI_RITS and self.last_clicked_roi not in self.old_table_names:
self.current_roi = self.roi_table_model.row_data(self.selected_row)[0]
else:
self.last_clicked_roi = self.current_roi
if self.roi_table_model.rowCount() == 0:
self.disable_roi_properties()
if not self.roi_table_model.rowCount() == 0:
Expand Down Expand Up @@ -421,6 +425,10 @@ def remove_roi(self) -> None:
if self.roi_table_model.rowCount() == 0:
self.removeBtn.setEnabled(False)
self.disable_roi_properties()
else:
self.set_old_table_names()
self.current_roi = self.roi_table_model.row_data(self.selected_row)[0]
self.set_roi_properties()

def clear_all_rois(self) -> None:
"""
Expand Down
Loading