diff -r 8fbff50141f8 -r 0e48629c1e6d Viewer.py --- a/Viewer.py Mon Aug 13 18:04:19 2007 +0200 +++ b/Viewer.py Mon Aug 13 18:06:50 2007 +0200 @@ -993,6 +993,8 @@ def AddNewBlock(self, bbox): dialog = BlockPropertiesDialog(self.Parent) dialog.SetBlockList(self.Controler.GetBlockTypes()) + dialog.SetPouNames(self.Controler.GetProjectPouNames()) + dialog.SetPouElementNames(self.Controler.GetCurrentElementEditingVariables()) dialog.SetMinBlockSize((bbox.width, bbox.height)) if dialog.ShowModal() == wx.ID_OK: id = self.GetNewId() @@ -1019,7 +1021,8 @@ vars = self.Controler.GetCurrentElementEditingInterfaceVars() if vars: for var in vars: - varlist.append((var["Name"], var["Class"], var["Type"])) + if var["Edit"]: + varlist.append((var["Name"], var["Class"], var["Type"])) returntype = self.Controler.GetCurrentElementEditingInterfaceReturnType() if returntype: varlist.append((self.Controler.GetCurrentElementEditingName(), "Output", returntype)) @@ -1143,7 +1146,7 @@ dialog.Destroy() def AddNewTransition(self, bbox): - dialog = TransitionContentDialog(self.Parent) + dialog = TransitionContentDialog(self.Parent, self.GetDrawingMode() == FREEDRAWING_MODE) dialog.SetTransitions(self.Controler.GetCurrentElementEditingTransitions()) if dialog.ShowModal() == wx.ID_OK: id = self.GetNewId() @@ -1186,6 +1189,8 @@ def EditBlockContent(self, block): dialog = BlockPropertiesDialog(self.Parent) dialog.SetBlockList(self.Controler.GetBlockTypes()) + dialog.SetPouNames(self.Controler.GetProjectPouNames()) + dialog.SetPouElementNames(self.Controler.GetCurrentElementEditingVariables()) dialog.SetMinBlockSize(block.GetSize()) values = {"name" : block.GetName(), "type" : block.GetType(), "inputs" : block.GetInputTypes()} values["extension"] = block.GetExtension() @@ -1209,7 +1214,8 @@ vars = self.Controler.GetCurrentElementEditingInterfaceVars() if vars: for var in vars: - varlist.append((var["Name"], var["Class"], var["Type"])) + if var["Edit"]: + varlist.append((var["Name"], var["Class"], var["Type"])) returntype = self.Controler.GetCurrentElementEditingInterfaceReturnType() if returntype: varlist.append((self.Controler.GetCurrentElementEditingName(), "Output", returntype))