From f87acc99c19ad66b78d6293e887412220a64f189 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Fri, 19 Dec 2008 03:08:39 +0000 Subject: [PATCH] 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/branches/glabels-2_2@803 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- glabels2/ChangeLog | 7 +++++++ glabels2/src/view.c | 25 ------------------------- 2 files changed, 7 insertions(+), 25 deletions(-) diff --git a/glabels2/ChangeLog b/glabels2/ChangeLog index be10bccb..05f6c6c8 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 * po/POTFILES.in: 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); -- 2.39.5