mirror of
https://github.com/naruxde/revpicommander.git
synced 2026-08-16 05:45:53 +02:00
fix: State management in connection manager
This commit is contained in:
@@ -253,7 +253,6 @@ class RevPiPlcList(QtWidgets.QDialog, Ui_diag_connections):
|
||||
def on_tre_connections_currentItemChanged(
|
||||
self, current: QtWidgets.QTreeWidgetItem, previous: QtWidgets.QTreeWidgetItem):
|
||||
|
||||
self._edit_state()
|
||||
self._load_cbb_folder()
|
||||
|
||||
if current and current.type() == NodeType.CON:
|
||||
@@ -281,6 +280,8 @@ class RevPiPlcList(QtWidgets.QDialog, Ui_diag_connections):
|
||||
self.__current_item = QtWidgets.QTreeWidgetItem()
|
||||
self.cbb_folder.setCurrentText(current.text(0) if current else "")
|
||||
|
||||
self._edit_state()
|
||||
|
||||
@QtCore.pyqtSlot()
|
||||
def on_btn_up_clicked(self):
|
||||
self._move_item(-1)
|
||||
@@ -329,6 +330,8 @@ class RevPiPlcList(QtWidgets.QDialog, Ui_diag_connections):
|
||||
elif item_to_remove and item_to_remove.type() == NodeType.CON:
|
||||
remove_item(item_to_remove)
|
||||
|
||||
self._edit_state()
|
||||
|
||||
@QtCore.pyqtSlot()
|
||||
def on_btn_add_clicked(self, settings_preset: RevPiSettings = None):
|
||||
"""Create new element."""
|
||||
|
||||
Reference in New Issue
Block a user