[dia] Work around Ellipse::move_handle not behaving as expected



commit 832f6b1fb7ac8a30b14f220204a15e15c6a3835f
Author: Hans Breuer <hans breuer org>
Date:   Sun May 10 17:05:23 2009 +0200

    Work around Ellipse::move_handle not behaving as expected
---
 plug-ins/python/dot2dia.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/plug-ins/python/dot2dia.py b/plug-ins/python/dot2dia.py
index bbd96e9..3de3840 100644
--- a/plug-ins/python/dot2dia.py
+++ b/plug-ins/python/dot2dia.py
@@ -201,7 +201,10 @@ def ImportFile (sFile, diagramData) :
 		x, y = n.Pos()
 		w, h = n.Size()
 		obj, h1, h2 = nodeType.create(x-w/2, y-h/2) # Dot pos is center, Dia (usually) uses top/left
-		obj.move_handle(h2, (x+w/2, y+h/2), 0, 0) # resize the object
+		# resizing the Ellipse by handle is screwed
+		# obj.move_handle(h2, (x+w/2, y+h/2), 0, 0) # resize the object
+		obj.properties["elem_width"] = w
+		obj.properties["elem_height"] = h
 		if n.parms.has_key('fillcolor') :
 			try :
 				obj.properties['fill_colour'] = n.parms['fillcolor'] # same color syntax?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]