[dia] Standard - Image: handle pixbuf change



commit dc963d1d2fd08ab45185f53f03fee871f2a41e93
Author: Hans Breuer <hans breuer org>
Date:   Sun Apr 20 11:14:06 2014 +0200

    Standard - Image: handle pixbuf change
    
    the "not implemented" warning was triggered by image creation via
    DiaImportRenderer::draw_image.c()

 objects/standard/image.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/objects/standard/image.c b/objects/standard/image.c
index 2957464..6a2bce4 100644
--- a/objects/standard/image.c
+++ b/objects/standard/image.c
@@ -218,8 +218,11 @@ image_set_props(Image *image, GPtrArray *props)
       if (pixbuf)
        g_object_unref (pixbuf);
     } else {
-      if (image->pixbuf)
-        message_warning ("FIXME: handle pixbuf change!");
+      if (image->pixbuf) {
+       if (image->image)
+         g_object_unref (image->image);
+       image->image = dia_image_new_from_pixbuf (image->pixbuf);
+      }
     }
   }
 


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