--- a/Dialogs.py Wed Jan 30 09:52:57 2008 +0100
+++ b/Dialogs.py Wed Jan 30 18:48:05 2008 +0100
@@ -185,6 +185,9 @@
self.PouNames = []
self.PouElementNames = []
+ def SetPreviewFont(self, font):
+ self.Preview.SetFont(font)
+
def FindTreeItem(self, root, name, inputs = None):
if root.IsOk():
pydata = self.TypeTree.GetPyData(root)
@@ -338,6 +341,7 @@
def RefreshPreview(self):
dc = wx.ClientDC(self.Preview)
+ dc.SetFont(self.Preview.GetFont())
dc.Clear()
item = self.TypeTree.GetSelection()
if item.IsOk():
@@ -525,6 +529,9 @@
self.Class.Append(choice)
self.Class.SetStringSelection("Input")
+ def SetPreviewFont(self, font):
+ self.Preview.SetFont(font)
+
def RefreshNameList(self):
selected = self.VariableName.GetStringSelection()
self.VariableName.Clear()
@@ -626,6 +633,7 @@
def RefreshPreview(self):
dc = wx.ClientDC(self.Preview)
+ dc.SetFont(self.Preview.GetFont())
dc.Clear()
expression = self.Expression.GetValue()
if self.Expression.IsEnabled() and expression != "":
@@ -785,7 +793,10 @@
self._init_ctrls(parent)
self.Connection = None
self.MinConnectionSize = None
-
+
+ def SetPreviewFont(self, font):
+ self.Preview.SetFont(font)
+
def SetMinConnectionSize(self, size):
self.MinConnectionSize = size
@@ -820,6 +831,7 @@
def RefreshPreview(self):
dc = wx.ClientDC(self.Preview)
+ dc.SetFont(self.Preview.GetFont())
dc.Clear()
if self.radioButton1.GetValue():
self.Connection = FBD_Connector(self.Preview, CONNECTOR, self.ConnectionName.GetValue())
@@ -984,7 +996,10 @@
elif type == "coil":
self._init_ctrls(parent, "Edit Coil Values", ['Normal','Negate','Set','Reset'])
self.Element = LD_Coil(self.Preview, COIL_NORMAL, "")
-
+
+ def SetPreviewFont(self, font):
+ self.Preview.SetFont(font)
+
def SetElementSize(self, size):
min_width, min_height = self.Element.GetMinSize()
width, height = max(min_width, size[0]), max(min_height, size[1])
@@ -1058,6 +1073,7 @@
def RefreshPreview(self):
dc = wx.ClientDC(self.Preview)
+ dc.SetFont(self.Preview.GetFont())
dc.Clear()
clientsize = self.Preview.GetClientSize()
width, height = self.Element.GetSize()
@@ -1205,6 +1221,9 @@
self.PowerRailMinSize = (0, 0)
self.PowerRail = None
+ def SetPreviewFont(self, font):
+ self.Preview.SetFont(font)
+
def SetMinSize(self, size):
self.PowerRailMinSize = size
self.RefreshPreview()
@@ -1230,6 +1249,7 @@
def RefreshPreview(self):
dc = wx.ClientDC(self.Preview)
+ dc.SetFont(self.Preview.GetFont())
dc.Clear()
self.PowerRail = LD_PowerRail(self.Preview, self.Type, connectors = [True for i in xrange(self.PinNumber.GetValue())])
min_width, min_height = 2, LD_LINE_SIZE * self.PinNumber.GetValue()
@@ -1384,6 +1404,9 @@
self.Variables = []
self.StepNames = []
+ def SetPreviewFont(self, font):
+ self.Preview.SetFont(font)
+
def OnOK(self, event):
step_name = self.StepName.GetValue()
if step_name == "":
@@ -1455,6 +1478,7 @@
def RefreshPreview(self):
dc = wx.ClientDC(self.Preview)
+ dc.SetFont(self.Preview.GetFont())
dc.Clear()
self.Step = SFC_Step(self.Preview, self.StepName.GetValue(), self.Initial)
if self.checkBox1.IsChecked():
@@ -1639,7 +1663,10 @@
self.MinTransitionSize = None
self.Element = SFC_Transition(self.Preview)
-
+
+ def SetPreviewFont(self, font):
+ self.Preview.SetFont(font)
+
def SetElementSize(self, size):
min_width, min_height = self.Element.GetMinSize()
width, height = max(min_width, size[0]), max(min_height, size[1])
@@ -1745,6 +1772,7 @@
def RefreshPreview(self):
dc = wx.ClientDC(self.Preview)
+ dc.SetFont(self.Preview.GetFont())
dc.Clear()
clientsize = self.Preview.GetClientSize()
posx, posy = self.Element.GetPosition()
@@ -1900,7 +1928,10 @@
self.Divergence = None
self.MinSize = (0, 0)
-
+
+ def SetPreviewFont(self, font):
+ self.Preview.SetFont(font)
+
def GetValues(self):
values = {}
if self.radioButton1.GetValue():
@@ -1927,6 +1958,7 @@
def RefreshPreview(self):
dc = wx.ClientDC(self.Preview)
+ dc.SetFont(self.Preview.GetFont())
dc.Clear()
if self.radioButton1.GetValue():
self.Divergence = SFC_Divergence(self.Preview, SELECTION_DIVERGENCE, self.Sequences.GetValue())