[PD-cvs] SF.net SVN: pure-data:[10704] branches/pd-extended/0.41/pd/src/g_editor.c

eighthave at users.sourceforge.net eighthave at users.sourceforge.net
Sat Jan 31 22:05:14 CET 2009


Revision: 10704
          http://pure-data.svn.sourceforge.net/pure-data/?rev=10704&view=rev
Author:   eighthave
Date:     2009-01-31 21:05:13 +0000 (Sat, 31 Jan 2009)

Log Message:
-----------
- moved the code that shifts the "Duplicate" copy/paste 10x10 pixels.  It is
  now in canvas_dopaste, so that it happens with both copy/paste and
  duplicate.  Ideally, it would work like discussed in this thread:

http://lists.puredata.info/pipermail/pd-list/2009-01/067731.html

Modified Paths:
--------------
    branches/pd-extended/0.41/pd/src/g_editor.c

Modified: branches/pd-extended/0.41/pd/src/g_editor.c
===================================================================
--- branches/pd-extended/0.41/pd/src/g_editor.c	2009-01-31 16:49:33 UTC (rev 10703)
+++ branches/pd-extended/0.41/pd/src/g_editor.c	2009-01-31 21:05:13 UTC (rev 10704)
@@ -2128,6 +2128,7 @@
 {
     t_gobj *newgobj, *last, *g2;
     int dspstate = canvas_suspend_dsp(), nbox, count;
+    t_selection *y;
 
     canvas_editmode(x, 1.);
     glist_noselect(x);
@@ -2142,6 +2143,8 @@
     for (g2 = x->gl_list, count = 0; g2; g2 = g2->g_next, count++)
         if (count >= nbox)
             glist_select(x, g2);
+    for (y = x->gl_editor->e_selection; y; y = y->sel_next)
+        gobj_displace(y->sel_what, x, 10, 10);
     paste_canvas = 0;
     canvas_resume_dsp(dspstate);
     canvas_dirty(x, 1);
@@ -2181,14 +2184,10 @@
 {
     if (x->gl_editor->e_onmotion == MA_NONE)
     {
-        t_selection *y;
         canvas_copy(x);
         canvas_setundo(x, canvas_undo_paste, canvas_undo_set_paste(x),
             "duplicate");
         canvas_dopaste(x, copy_binbuf);
-        for (y = x->gl_editor->e_selection; y; y = y->sel_next)
-            gobj_displace(y->sel_what, x,
-                10, 10);
         canvas_dirty(x, 1);
     }
 }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Pd-cvs mailing list