diff --git a/dcspy/qt_gui.py b/dcspy/qt_gui.py index 285a324e8..0104fea0c 100644 --- a/dcspy/qt_gui.py +++ b/dcspy/qt_gui.py @@ -590,7 +590,7 @@ def _save_current_cell(self, currentRow: int, currentColumn: int, previousRow: i cell_combo = self.tw_gkeys.cellWidget(currentRow, currentColumn) self._cell_ctrl_content_changed(text=cell_combo.currentText(), widget=cell_combo, row=currentRow, col=currentColumn) - def _input_iface_changed(self, button: QRadioButton) -> None: + def _input_iface_changed(self) -> None: """ Triggered when new input interface is selected. @@ -601,7 +601,10 @@ def _input_iface_changed(self, button: QRadioButton) -> None: section = self._find_section_name(ctrl_name=current_cell_text) key_name = self._get_key_name_from_row_col(self.current_row, self.current_col) ctrl_key = self.ctrl_input[section][current_cell_text] - self.input_reqs[self.current_plane][key_name] = GuiPlaneInputRequest.from_control_key(ctrl_key=ctrl_key, rb_iface=button.objectName()) + input_iface_name = self.bg_rb_input_iface.checkedButton().objectName() + custom_value = self.le_custom.text() if input_iface_name == 'rb_custom' else '' + self.input_reqs[self.current_plane][key_name] = GuiPlaneInputRequest.from_control_key(ctrl_key=ctrl_key, rb_iface=input_iface_name, + custom_value=custom_value) def _le_custom_text_edited(self) -> None: """Triggered when text is changed and user press enter or widget lose focus.""" @@ -611,8 +614,9 @@ def _le_custom_text_edited(self) -> None: key_name = self._get_key_name_from_row_col(self.current_row, self.current_col) ctrl_key = self.ctrl_input[section][current_cell_text] input_iface_name = self.bg_rb_input_iface.checkedButton().objectName() + custom_value = self.le_custom.text() if input_iface_name == 'rb_custom' else '' self.input_reqs[self.current_plane][key_name] = GuiPlaneInputRequest.from_control_key(ctrl_key=ctrl_key, rb_iface=input_iface_name, - custom_value=self.le_custom.text()) + custom_value=custom_value) def _copy_cell_to_row(self) -> None: """Copy content of current cell to whole row."""