controls/LocationCellEditor.py
branchrename_on_location_change
changeset 2575 aee08bd135d8
parent 2574 48a486000e84
child 2579 8fb5c6eddc72
--- a/controls/LocationCellEditor.py	Wed Apr 03 13:20:28 2019 +0200
+++ b/controls/LocationCellEditor.py	Thu Apr 04 13:59:22 2019 +0200
@@ -127,6 +127,10 @@
             self.VariableName = infos["var_name"]
             self.VarType = infos["IEC_type"]
 
+            # when user selected something, end editing immediately
+            # so that changes over multiple colums appear
+            wx.CallAfter(self.Parent.Parent.CloseEditControl)
+
         self.Location.SetFocus()
 
     def OnLocationChar(self, event):
@@ -191,6 +195,9 @@
             var_type = self.CellControl.GetVarType()
             if var_type is not None:
                 self.Table.SetValueByName(row, 'Type', var_type)
+        else:
+            wx.CallAfter(self.Table.Parent.ShowErrorMessage,
+                _("Selected location is identical to previous one"))
         self.CellControl.Disable()
         return changed