Some bugs fixed
authorlbessard
Sun, 09 Dec 2007 17:14:14 +0100
changeset 128 d16a8df4d322
parent 127 436268f31dae
child 129 ae2421aa0aa4
Some bugs fixed
Dialogs.py
PLCControler.py
PLCGenerator.py
PLCOpenEditor.py
Viewer.py
--- a/Dialogs.py	Sun Dec 09 17:07:45 2007 +0100
+++ b/Dialogs.py	Sun Dec 09 17:14:14 2007 +0100
@@ -395,7 +395,7 @@
     
     def _init_coll_MainSizer_Items(self, parent):
         parent.AddSizer(self.TopSizer, 0, border=0, flag=wx.GROW)
-        parent.AddWindow(self.staticText4, 0, border=0, flag=wx.GROW)
+        parent.AddWindow(self.staticText5, 0, border=0, flag=wx.GROW)
         parent.AddWindow(self.Preview, 0, border=0, flag=wx.GROW)
         
     def _init_coll_MainSizer_Growables(self, parent):
@@ -420,7 +420,7 @@
         parent.AddGrowableRow(2)
             
     def _init_coll_RightGridSizer_Items(self, parent):
-        parent.AddWindow(self.staticText5, 0, border=0, flag=wx.GROW)
+        parent.AddWindow(self.staticText4, 0, border=0, flag=wx.GROW)
         parent.AddWindow(self.VariableName, 0, border=0, flag=wx.GROW)
         
     def _init_coll_RightGridSizer_Growables(self, parent):
--- a/PLCControler.py	Sun Dec 09 17:07:45 2007 +0100
+++ b/PLCControler.py	Sun Dec 09 17:14:14 2007 +0100
@@ -1860,7 +1860,7 @@
                             self.SetConnectionWires(connection, connector)
                             powerrail.connectionPointIn.append(connection)
 
-    def AddEditedElementEditingContact(self, tagname, id):
+    def AddEditedElementContact(self, tagname, id):
         element = self.GetEditedElement(tagname)
         if element is not None:
             contact = plcopen.contact()
--- a/PLCGenerator.py	Sun Dec 09 17:07:45 2007 +0100
+++ b/PLCGenerator.py	Sun Dec 09 17:14:14 2007 +0100
@@ -109,7 +109,6 @@
             raise ValueError, "Undefined pou type"
         pou_program.GenerateInterface(pou.getInterface())
         pou_program.GenerateConnectionTypes(pou)
-        #print pou.getName(), pou_program.ConnectionTypes, pou_program.RelatedConnections
         pou_program.GenerateProgram(pou)
         currentProgram += pou_program.GenerateSTProgram()
 
--- a/PLCOpenEditor.py	Sun Dec 09 17:07:45 2007 +0100
+++ b/PLCOpenEditor.py	Sun Dec 09 17:14:14 2007 +0100
@@ -837,6 +837,7 @@
         event.Skip()
     
     def OnBlockTool(self, event):
+        self.ResetToolToggle(ID_PLCOPENEDITORTOOLBARBLOCK)
         selected = self.GetPageSelection()
         if selected != -1:
             self.GetPage(selected).SetMode(MODE_BLOCK)
--- a/Viewer.py	Sun Dec 09 17:07:45 2007 +0100
+++ b/Viewer.py	Sun Dec 09 17:14:14 2007 +0100
@@ -281,7 +281,9 @@
             dc = wx.BufferedPaintDC(self)
         else:
             dc = wx.ClientDC(self)
-        if wx.Platform != '__WXMSW__':
+        if wx.Platform == '__WXMSW__':
+            dc.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.NORMAL))
+        else:
             dc.SetFont(wx.NORMAL_FONT)
         if wx.VERSION >= (2, 6, 0):
             self.DoPrepareDC(dc)
@@ -1015,7 +1017,6 @@
             self.SelectedElement.SetSelected(True)
             self.SelectedElement.OnRightUp(event, self.GetLogicalDC(), self.Scaling)
             wx.CallAfter(self.SetCursor, wx.NullCursor)
-            self.ReleaseMouse()
             self.Refresh(False)
         else:
             self.PopupDefaultMenu(False)