[dia] diagram-as-element: fix jumping on move



commit 48c49879332e937a4de3badbf3bdb4d71cae835f
Author: Hans Breuer <hans breuer org>
Date:   Fri Jul 30 14:36:32 2010 +0200

    diagram-as-element: fix jumping on move
    
    The Object:position was not properly maintained.

 objects/Misc/diagram_as_object.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/objects/Misc/diagram_as_object.c b/objects/Misc/diagram_as_object.c
index 9f55de5..cb72d75 100644
--- a/objects/Misc/diagram_as_object.c
+++ b/objects/Misc/diagram_as_object.c
@@ -223,6 +223,7 @@ _dae_update_data(DiagramAsElement *dae)
 {
   struct utimbuf utbuf;
   Element *elem = &dae->element;
+  DiaObject *obj = &elem->object;
   
   if (   strlen(dae->filename)
 #if GLIB_CHECK_VERSION(2,18,0)
@@ -256,6 +257,9 @@ _dae_update_data(DiagramAsElement *dae)
   elem->extra_spacing.border_trans = dae->border_line_width/2.0;
   element_update_boundingbox(elem);
   element_update_handles(elem);
+
+  /* adjust objects position, otherwise it'll jump on move */
+  obj->position = elem->corner;
 }
 static void 
 _dae_destroy(DiagramAsElement *dae) 



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