Fix bug with 'not saved' state for network when removing a slave
authorLaurent Bessard
Mon, 18 Jun 2012 19:37:30 +0200
changeset 744 bc1bbbb5ef71
parent 743 17715d2ecf10
child 745 0bd84a528133
Fix bug with 'not saved' state for network when removing a slave
objdictgen/networkedit.py
objdictgen/nodelist.py
--- a/objdictgen/networkedit.py	Mon Jun 18 03:48:23 2012 +0200
+++ b/objdictgen/networkedit.py	Mon Jun 18 19:37:30 2012 +0200
@@ -271,7 +271,7 @@
                     self.NetworkNodes.SetSelection(new_selection)
                     if new_selection > 0:
                         self.NodeList.SetCurrentSelected(slaveids[new_selection - 1])
-                    self.RefreshBufferState()
+                self.RefreshBufferState()
             else:
                 self.ShowErrorMessage(result)
         dialog.Destroy()
--- a/objdictgen/nodelist.py	Mon Jun 18 03:48:23 2012 +0200
+++ b/objdictgen/nodelist.py	Mon Jun 18 19:37:30 2012 +0200
@@ -163,6 +163,7 @@
     def RemoveSlaveNode(self, index):
         if index in self.SlaveNodes.keys():
             self.SlaveNodes.pop(index)
+            self.Changed = True
             return None
         else:
             return _("Node with \"0x%2.2X\" ID doesn't exist")