Zapit-Optostim / zapit

General purpose optostimulation system
GNU Lesser General Public License v2.1
6 stars 1 forks source link

If a stimConfig file is loaded at the CLI, this is not reported in the GUI #123

Open raacampbell opened 1 year ago

raacampbell commented 1 year ago

Loading a stim config file at the CLI does not update the GUI state to indicate this happened.

To Reproduce Steps to reproduce the behavior:

  1. start_zapit
  2. fn = fullfile(zapit.updater.getInstallPath,'examples','example_stimulus_config_files','uniAndBilateral_5_conditions.yml');
  3. hZP.loadStimConfig(fn)
  4. hZP.stimConfig % Yes it is loaded

But GUI does not report this.

How to fix

The code that loads the file and updates the GUI in zapit.gui.main.controller.loadStimConfig_Callback needs to be separated. The GUI update should run based on a callback that fires when the stimConfig changes.