GUI: file_path_panel takes directory from spreadhseet if there is one otherwise previous default logic applies

This commit is contained in:
appleb_m committed 2025-11-20 09:22:22 +01:00
1 parent 8a3e3f4c76
commit c9509f50e9
1 file changed
+4 -1
+4 -1
View File
@@ -143,7 +143,10 @@ class FilePathPanel(QWidget):
self.__puck_name = sample.puck_name
self.__puck_pos = sample.pin
self.run_number_edit.setValue(1)
if sample.location is not None:
if sample.aaredb_params is not None and sample.aaredb_params.directory is not None:
self.directory_edit.setText(f"{sample.aaredb_params.directory}")
elif sample.location is not None:
self.directory_edit.setText(f"{self.__formatted_date}/{self.__puck_name}/{self.__puck_pos:02d}")
else:
self.directory_edit.setText(f"{self.__formatted_date}/manual/{self.__sample_name}")