From: Jim Evins Date: Fri, 19 Dec 2008 03:11:15 +0000 (+0000) Subject: 2008-12-18 Jim Evins X-Git-Tag: glabels-2_3_0~244 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5f5fc0b681e7db77307f05ee7fcc7e2236f12467;p=glabels 2008-12-18 Jim Evins * src/view.c: (selection_received_cb): Fixed paste bug that caused a duplicate phantom view_object to be created for each new label_object. This is because the view now (as of r673) the view monitiors the label for new objects and creates view_objects automatically. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@804 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- diff --git a/glabels2/ChangeLog b/glabels2/ChangeLog index 153b637c..4135d495 100644 --- a/glabels2/ChangeLog +++ b/glabels2/ChangeLog @@ -1,3 +1,10 @@ +2008-12-18 Jim Evins + + * src/view.c: (selection_received_cb): + Fixed paste bug that caused a duplicate phantom view_object to be created for + each new label_object. This is because the view now (as of r673) the view + monitiors the label for new objects and creates view_objects automatically. + 2008-12-14 Jim Evins * src/ui.c: (gl_ui_new): diff --git a/glabels2/src/view.c b/glabels2/src/view.c index a9e7ceeb..e5962394 100644 --- a/glabels2/src/view.c +++ b/glabels2/src/view.c @@ -2791,31 +2791,6 @@ selection_received_cb (GtkWidget *widget, newobject = gl_label_object_dup (object, view->label); gl_debug (DEBUG_VIEW, "object pasted"); - - if (GL_IS_LABEL_BOX (newobject)) { - view_object = gl_view_box_new (GL_LABEL_BOX(newobject), - view); - } else if (GL_IS_LABEL_ELLIPSE (newobject)) { - view_object = gl_view_ellipse_new (GL_LABEL_ELLIPSE(newobject), - view); - } else if (GL_IS_LABEL_LINE (newobject)) { - view_object = gl_view_line_new (GL_LABEL_LINE(newobject), - view); - } else if (GL_IS_LABEL_IMAGE (newobject)) { - view_object = gl_view_image_new (GL_LABEL_IMAGE(newobject), - view); - } else if (GL_IS_LABEL_TEXT (newobject)) { - view_object = gl_view_text_new (GL_LABEL_TEXT(newobject), - view); - } else if (GL_IS_LABEL_BARCODE (newobject)) { - view_object = gl_view_barcode_new (GL_LABEL_BARCODE(newobject), - view); - } else { - /* Should not happen! */ - view_object = NULL; - g_message ("Invalid label object type."); - } - gl_view_select_object (view, view_object); } g_object_unref (label);