def trigger_gui_signals(*args): sm_manager_model = args[0] main_window_controller = args[1] setup_config = args[2] state_machine = args[3] menubar_ctrl = main_window_controller.get_controller('menu_bar_controller') try: sm_manager_model.selected_state_machine_id = state_machine.state_machine_id gui_helper_state_machine.save_state_machine_as(path=setup_config['target_path'][0]) while state_machine.marked_dirty: time.sleep(0.1) except: logger.exception("Could not save state machine") finally: call_gui_callback(menubar_ctrl.on_quit_activate, None)
def on_save_as_copy_activate(self, widget=None, data=None, path=None): return gui_helper_state_machine.save_state_machine_as( path, recent_opened_notification=True, as_copy=True)