summaryrefslogtreecommitdiff
path: root/gtk2_ardour/canvas-simplerect.c
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-01-03 00:08:58 +0000
committerCarl Hetherington <carl@carlh.net>2010-01-03 00:08:58 +0000
commit0f79f67398fcf319e9471e9b2b3b91e2ea6b2fee (patch)
tree7faedc8d87a8a4195be2d4878a4dc2abb54ab487 /gtk2_ardour/canvas-simplerect.c
parentc88716665a62399efa6278b5eaa254434a77a305 (diff)
Some cleanups to drawing of automation line control points. Drag all selected automation points if one selected point is dragged.
git-svn-id: svn://localhost/ardour2/branches/3.0@6437 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/canvas-simplerect.c')
-rw-r--r--gtk2_ardour/canvas-simplerect.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/gtk2_ardour/canvas-simplerect.c b/gtk2_ardour/canvas-simplerect.c
index a3894b0790..1edbd3090e 100644
--- a/gtk2_ardour/canvas-simplerect.c
+++ b/gtk2_ardour/canvas-simplerect.c
@@ -20,7 +20,6 @@ enum {
PROP_FILL_COLOR_RGBA,
PROP_OUTLINE_COLOR_RGBA,
PROP_DRAW
-
};
static void gnome_canvas_simplerect_class_init (GnomeCanvasSimpleRectClass *class);
@@ -255,7 +254,6 @@ gnome_canvas_simplerect_bounds (GnomeCanvasItem *item, double *x1, double *y1, d
*y1 = simplerect->y1;
*x2 = simplerect->x2 + 1;
*y2 = simplerect->y2 + 1;
-
}
@@ -456,7 +454,23 @@ gnome_canvas_simplerect_set_property (GObject *object,
break;
}
- simplerect->full_draw_on_update = update;
+ if (!simplerect->full_draw_on_update) {
+ /* XXX: not sure about this;
+ *
+ * I changed the next line to be conditional, rather than always
+ * being executed. Without the condition, the following bug occurs:
+ *
+ * caller sets a property (e.g. outline colour); this sets update = TRUE and hence full_draw_on_update = TRUE
+ * update is requested (and it is intended, I suppose, that during this update, full_draw_on_update is noted)
+ * ... update does not occur before ...
+ * caller sets the same property again to the same value; this sets update = FALSE and hence full_draw_on_update = FALSE
+ * update now occurs, but full_draw_on_update is FALSE, so the full redraw does not happen,
+ * which results in graphical glitches.
+ *
+ * (Carl, 2/1/2010)
+ */
+ simplerect->full_draw_on_update = update;
+ }
if (update || bounds_changed) {
gnome_canvas_item_request_update (GNOME_CANVAS_ITEM(object));