GUI: file path protection for run numbers based on data collection type
This commit is contained in:
@@ -325,6 +325,8 @@ class MainWindow(QMainWindow):
|
||||
|
||||
self.daq.update.connect(self.beamline.omega_panel.update_daq_status)
|
||||
self.daq.update.connect(self.beamline.smargon_panel.update_daq_status)
|
||||
self.daq.update.connect(self.job_list_panel.update_daq_status)
|
||||
self.daq.update.connect(self.data_collection.file_path_panel.update_daq_status)
|
||||
|
||||
self.daq.update.connect(self.data_collection.update_daq_status)
|
||||
self.daq.update.connect(self.beamline.illumination_panel.update_daq_status)
|
||||
@@ -332,6 +334,7 @@ class MainWindow(QMainWindow):
|
||||
self.daq.update.connect(self.sample_camera.update_daq_status)
|
||||
self.daq.update.connect(self.tell_samples.update_daq_status)
|
||||
self.daq.update.connect(self.ref_tools_panel.update_daq_status)
|
||||
|
||||
if self.__decoded_token.staff:
|
||||
self.daq.update.connect(self.beamline.beam_size.update_daq_status)
|
||||
self.daq.update.connect(self.beamline.beam_center.update_daq_status)
|
||||
|
||||
@@ -66,11 +66,16 @@ class DataCollectionSettings(QFrame):
|
||||
self.screening.update_filename(self.file_path_panel.filename)
|
||||
self.simple.update_filename(self.file_path_panel.filename)
|
||||
|
||||
self.file_path_panel.set_scan_kind("raster")
|
||||
self.file_path_panel.path_updated.connect(raster_mgr.update_filename)
|
||||
self.file_path_panel.path_updated.connect(self.screening.update_filename)
|
||||
self.file_path_panel.path_updated.connect(self.simple.update_filename)
|
||||
self.__sample_id = None
|
||||
|
||||
self.__tab_widget.currentChanged.connect(self._on_tab_changed)
|
||||
|
||||
# ... existing code ...
|
||||
|
||||
@Slot()
|
||||
def switch_to_raster(self):
|
||||
self.__tab_widget.setCurrentIndex(0)
|
||||
@@ -87,3 +92,13 @@ class DataCollectionSettings(QFrame):
|
||||
if s.sample is not None and s.sample.db_id != self.__sample_id:
|
||||
self.__sample_id = s.sample.db_id
|
||||
self.__tab_widget.setCurrentIndex(0)
|
||||
|
||||
@Slot(int)
|
||||
def _on_tab_changed(self, idx: int):
|
||||
# 0: Raster, 1: Rotation (incl. screening), 2: Simple (rotation wrapper), 3: XRF (ignore)
|
||||
kind = "rotation"
|
||||
if idx == 0:
|
||||
kind = "raster"
|
||||
elif idx == 1 or idx == 2:
|
||||
kind = "rotation"
|
||||
self.file_path_panel.set_scan_kind(kind)
|
||||
Reference in New Issue
Block a user