[dia/dia-0-97] Bug 607564 - custom shape svg:text elements positioned wrong



commit f5b64b8a27049bbb442e6e9e1a18f8e27d9121fd
Author: Hans Breuer <hans breuer org>
Date:   Wed Oct 20 21:26:43 2010 +0200

    Bug 607564 - custom shape svg:text elements positioned wrong
    
    custom_distance_from(), custom_draw() and custom_update_data() are
    modifying the conceptionally const display_list, i.e. the Text object
    contained (shared between all object instances), but update_data was
    not restoring the previous state.

 objects/custom/custom_object.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/objects/custom/custom_object.c b/objects/custom/custom_object.c
index 5014df4..0dfd3f6 100644
--- a/objects/custom/custom_object.c
+++ b/objects/custom/custom_object.c
@@ -1478,6 +1478,8 @@ custom_update_data(Custom *custom, AnchorShape horiz, AnchorShape vert)
       custom_reposition_text(custom, &el->text);
       text_calc_boundingbox(el->text.object,&rect);
       /* padding only to be applied on the users text box */
+      /* but we need to restore the original position of the 'constant' object */
+      text_set_position(el->text.object, &el->text.anchor);
       break;
     default :
       g_assert_not_reached();



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