From 0dec527641f80d5dd1c1fc24213e450a63448a7d Mon Sep 17 00:00:00 2001
From: Jonathan Wilkes <jon.w.wilkes@gmail.com>
Date: Sun, 24 Apr 2016 19:23:42 -0400
Subject: [PATCH] fix jwilkes/purr-data#43 [image] will throw an error "old
 command"

---
 externals/moonlib/image.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/externals/moonlib/image.c b/externals/moonlib/image.c
index b401e39ae..7417d125d 100644
--- a/externals/moonlib/image.c
+++ b/externals/moonlib/image.c
@@ -143,7 +143,9 @@ void image_drawme(t_image *x, t_glist *glist, int firsttime)
 
 void image_erase(t_image *x, t_glist *glist)
 {
-    sys_vgui(".x%lx.c delete %xS\n", glist_getcanvas(glist), x);
+    /* This isn't necessary anymore-- deleting the parent gobj deletes the
+       child svg image element... */
+    //sys_vgui(".x%lx.c delete %xS\n", glist_getcanvas(glist), x);
 }
 
 
@@ -168,12 +170,12 @@ static void image_displace(t_gobj *z, t_glist *glist, int dx, int dy)
     t_image *x = (t_image *)z;
     x->x_obj.te_xpix += dx;
     x->x_obj.te_ypix += dy;
-    sys_vgui(".x%lx.c coords %xSEL %d %d %d %d\n",
-        glist_getcanvas(glist), x,
-        text_xpix(&x->x_obj, glist),
-        text_ypix(&x->x_obj, glist),
-        text_xpix(&x->x_obj, glist) + x->x_width,
-        text_ypix(&x->x_obj, glist) + x->x_height);
+    //sys_vgui(".x%lx.c coords %xSEL %d %d %d %d\n",
+    //    glist_getcanvas(glist), x,
+    //    text_xpix(&x->x_obj, glist),
+    //    text_ypix(&x->x_obj, glist),
+    //    text_xpix(&x->x_obj, glist) + x->x_width,
+    //    text_ypix(&x->x_obj, glist) + x->x_height);
     image_drawme(x, glist, 0);
     canvas_fixlinesfor(glist,(t_text *)x);
 }
-- 
GitLab