def spawn_presets_window(self, name): """ Opens the preset overlay for the given parameter name. arguments: - name: the parameter name. """ presets = self._config[name]['presets'] self._current_preset_name = name if self._current_preset is not None: self._current_preset.close() self._current_preset = Presets(presets, self) self._current_preset.show() self._current_preset.button_cancel.pressed.connect( self.hide_preset_worker) for btn in self._current_preset.button_preset: btn.pressed.connect(self.preset_worker) self.inactivate_settings_buttons() # Always set the focus to the tab self.tabs.setFocus()
def spawn_presets_window(self, name): presets = self._config[name]['presets'] self._current_preset_name = name if self._current_preset is not None: self._current_preset.close() self._current_preset = Presets(presets, self) self._current_preset.show() self._current_preset.button_cancel.pressed.connect(self.hide_preset_worker) for btn in self._current_preset.button_preset: btn.pressed.connect(self.preset_worker) self.inactivate_settings_buttons() # Always set the focus to the tab self.tabs.setFocus()