Fixed inconsistency in value display when setting integer value for float parameter
--- a/ConfigTreeNode.py Tue May 28 10:03:41 2013 +0200
+++ b/ConfigTreeNode.py Tue May 28 17:52:07 2013 +0200
@@ -150,8 +150,10 @@
parts = path.split(".", 1)
if self.MandatoryParams and parts[0] == self.MandatoryParams[0]:
self.MandatoryParams[1].setElementValue(parts[1], value)
+ value = self.MandatoryParams[1].getElementInfos(parts[0], parts[1])["value"]
elif self.CTNParams and parts[0] == self.CTNParams[0]:
self.CTNParams[1].setElementValue(parts[1], value)
+ value = self.CTNParams[1].getElementInfos(parts[0], parts[1])["value"]
return value, False
def CTNMakeDir(self):
--- a/editors/ConfTreeNodeEditor.py Tue May 28 10:03:41 2013 +0200
+++ b/editors/ConfTreeNodeEditor.py Tue May 28 17:52:07 2013 +0200
@@ -531,8 +531,8 @@
if res != textctrl.GetValue():
if isinstance(textctrl, wx.SpinCtrl):
textctrl.SetValue(res)
- else:
- textctrl.ChangeValue(res)
+ elif res is not None:
+ textctrl.ChangeValue(str(res))
if refresh:
wx.CallAfter(self.ParentWindow._Refresh, TITLE, FILEMENU, PROJECTTREE, PAGETITLES)
wx.CallAfter(self.ParentWindow.SelectProjectTreeItem, self.GetTagName())
--- a/xmlclass/xmlclass.py Tue May 28 10:03:41 2013 +0200
+++ b/xmlclass/xmlclass.py Tue May 28 17:52:07 2013 +0200
@@ -1598,14 +1598,14 @@
if path is not None:
parts = path.split(".", 1)
if attributes.has_key(parts[0]):
- if len(parts) != 0:
+ if len(parts) != 1:
raise ValueError("Wrong path!")
attr_type = gettypeinfos(attributes[parts[0]]["attr_type"]["basename"],
attributes[parts[0]]["attr_type"]["facets"])
value = getattr(self, parts[0], "")
elif elements.has_key(parts[0]):
if elements[parts[0]]["elmt_type"]["type"] == SIMPLETYPE:
- if len(parts) != 0:
+ if len(parts) != 1:
raise ValueError("Wrong path!")
attr_type = gettypeinfos(elements[parts[0]]["elmt_type"]["basename"],
elements[parts[0]]["elmt_type"]["facets"])
@@ -1620,6 +1620,11 @@
return attr.getElementInfos(parts[0])
else:
return attr.getElementInfos(parts[0], parts[1])
+ elif elements.has_key("content"):
+ if len(parts) > 0:
+ return self.content["value"].getElementInfos(name, path)
+ elif classinfos.has_key("base"):
+ classinfos["base"].getElementInfos(name, path)
else:
raise ValueError("Wrong path!")
else: