--- a/graphics/FBD_Objects.py Wed Jan 30 09:52:57 2008 +0100
+++ b/graphics/FBD_Objects.py Wed Jan 30 18:48:05 2008 +0100
@@ -94,13 +94,11 @@
# Refresh the size of text for name
def RefreshNameSize(self):
- dc = wx.ClientDC(self.Parent)
- self.NameSize = dc.GetTextExtent(self.Name)
+ self.NameSize = self.Parent.GetTextExtent(self.Name)
# Refresh the size of text for execution order
def RefreshExecutionOrderSize(self):
- dc = wx.ClientDC(self.Parent)
- self.ExecutionOrderSize = dc.GetTextExtent(str(self.ExecutionOrder))
+ self.ExecutionOrderSize = self.Parent.GetTextExtent(str(self.ExecutionOrder))
# Refresh the block bounding box
def RefreshBoundingBox(self):
@@ -216,8 +214,7 @@
if type != self.Type or self.Extension != extension:
if type != self.Type:
self.Type = type
- dc = wx.ClientDC(self.Parent)
- self.TypeSize = dc.GetTextExtent(self.Type)
+ self.TypeSize = self.Parent.GetTextExtent(self.Type)
self.Extension = extension
# Find the block definition from type given and create the corresponding
# inputs and outputs
@@ -440,13 +437,11 @@
# Refresh the size of text for name
def RefreshNameSize(self):
- dc = wx.ClientDC(self.Parent)
- self.NameSize = dc.GetTextExtent(self.Name)
+ self.NameSize = self.Parent.GetTextExtent(self.Name)
# Refresh the size of text for execution order
def RefreshExecutionOrderSize(self):
- dc = wx.ClientDC(self.Parent)
- self.ExecutionOrderSize = dc.GetTextExtent(str(self.ExecutionOrder))
+ self.ExecutionOrderSize = self.Parent.GetTextExtent(str(self.ExecutionOrder))
# Refresh the variable bounding box
def RefreshBoundingBox(self):
@@ -668,8 +663,7 @@
# Refresh the size of text for name
def RefreshNameSize(self):
- dc = wx.ClientDC(self.Parent)
- self.NameSize = dc.GetTextExtent(self.Name)
+ self.NameSize = self.Parent.GetTextExtent(self.Name)
# Refresh the connection bounding box
def RefreshBoundingBox(self):