labscript-suite / runmanager

𝗿𝘂𝗻𝗺𝗮𝗻𝗮𝗴𝗲𝗿 is an intuitive graphical interface for controlling 𝘭𝘢𝘣𝘴𝘤𝘳𝘪𝘱𝘵 𝘴𝘶𝘪𝘵𝘦 experiments. Includes multi-dimensional parameter scans and a remote programming interface for automation.
http://labscriptsuite.org
Other
3 stars 45 forks source link

Incorrect behaviour of default output directory on first run #71

Closed chrisjbillington closed 4 years ago

chrisjbillington commented 4 years ago

Upon first running runmanager after install, when there is no labscript file loaded from a saved config file, it incorrectly has the warning about a non-default output directory displayed:

image

Upon subsequently choosing a labscript file, it doesn't set the output directory correctly:

image

The "set default output directory" button is even greyed out. To workaround, one must choose an output directory manually, then the "set default output directory" button is enabled and can be used to restore things to sanity.

philipstarkey commented 4 years ago

So this is due to the fix for #69. I think possibly that fix went about it in the wrong way. I think #69 only happened when the labscript file was set when loading in a config (either at startup or manually) because selecting a new labscript file via the GUI called check_output_folder_update() which should always have updated self.previous_default_output_folder so the explicit addition of updating that variable in on_labscript_file_text_changed() is unnecessary.

Possibly the fix should be to remove check_output_folder_update() from on_select_labscript_file_clicked() and modify on_labscript_file_text_changed() to call check_output_folder_update().