Re: Gnome canvas issues

On Sat, Jul 10, 1999 at 06:18:55PM +0200, Simon Kagedal wrote:
> Hi Michael,
> I'm also a Canvas newbie, so sorry if this is "well duhh" to you.  But
> it seems to work if you do gnome_canvas_item_move instead of
> setting "x" and "y", like this:
> The question why it doesn't work as well with setting "x" and "y" is
> something I'd like to hear the answer to as well.

That's just what I needed to figure out what was wrong here.  It looks
like gnome_canvas_group_set_arg doesn't set the
GNOME_CANVAS_ITEM_NEED_AFFINE flag after updating the "x" and "y"
variables.  The following patch fixes this:

--- gnome-canvas.c.orig	Sat Jul 10 16:33:39 1999
+++ gnome-canvas.c	Sat Jul 10 17:34:24 1999
@@ -1611,6 +1611,13 @@
 		if (item->parent)
 			gnome_canvas_group_child_bounds (GNOME_CANVAS_GROUP (item->parent), item);
+		if (!(item->object.flags & GNOME_CANVAS_ITEM_NEED_AFFINE)) {
+			item->object.flags |= GNOME_CANVAS_ITEM_NEED_AFFINE;
+			if (item->parent != NULL)
+				gnome_canvas_item_request_update (item->parent);
+			else
+				gnome_canvas_request_update (item->canvas);
+		}
After applying this to libgnomeui, gglobe-canvas worked just great.

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