aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2010-01-16 10:58:26 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2010-01-16 10:58:26 +0000
commitcb030b6f9c7650045e3518b4307f7680b20b626c (patch)
treefc20f67ba350b16cc96b1d9aa873f4e6789a3329
parent915a3aa53d25d2306f3511993105b57447e7666c (diff)
only update the GUI if the canvasposition has really changed
svn path=/trunk/externals/iem/iemguts/; revision=13017
-rw-r--r--src/canvasposition.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/canvasposition.c b/src/canvasposition.c
index 03f839c..d8685d8 100644
--- a/src/canvasposition.c
+++ b/src/canvasposition.c
@@ -97,12 +97,15 @@ static void canvasposition_list(t_canvasposition *x, t_symbol*s, int argc, t_ato
dx = atom_getint(argv+0) - c->gl_obj.te_xpix;
dy = atom_getint(argv+1) - c->gl_obj.te_ypix;
- if(c0&&glist_isvisible(c0)) {
- gobj_displace((t_gobj*)c, c0, dx, dy);
- canvas_fixlinesfor(c0, (t_text*)c);
- } else {
- c->gl_obj.te_xpix+=dx;
- c->gl_obj.te_ypix+=dy;
+
+ if ((dx!=0)||(dy!=0)) {
+ if(c0&&glist_isvisible(c0)) {
+ gobj_displace((t_gobj*)c, c0, dx, dy);
+ canvas_fixlinesfor(c0, (t_text*)c);
+ } else {
+ c->gl_obj.te_xpix+=dx;
+ c->gl_obj.te_ypix+=dy;
+ }
}
}