fix problem with clearing non-empty location field after changing type of config variable
introduced by cd9db17 ("clear variable location cell in variable
panel, if variable class or type changed").
Closes #26
--- a/controls/VariablePanel.py Mon Apr 10 18:29:12 2017 +0300
+++ b/controls/VariablePanel.py Tue Apr 11 12:51:35 2017 +0300
@@ -800,9 +800,10 @@
def ClearLocation(self, row, col, value):
if self.Values[row].Location != '':
if self.Table.GetColLabelValue(col, False) == 'Class' and value not in ["Local", "Global"] or \
- self.Table.GetColLabelValue(col, False) == 'Type' and not self.Parent.Controler.IsLocatableType(value):
+ self.Table.GetColLabelValue(col, False) == 'Type' and not self.Controler.IsLocatableType(value):
self.Values[row].Location = ''
- self.RefreshValues()
+ self.RefreshValues()
+ self.SaveValues()
def BuildStdIECTypesMenu(self,type_menu):
# build a submenu containing standard IEC types