summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (from parent 1: 2bda673)
raw | patch | inline | side by side (from parent 1: 2bda673)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Tue, 9 May 2006 01:14:55 +0000 (01:14 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Tue, 9 May 2006 01:14:55 +0000 (01:14 +0000) |
src/selection-chemistry.cpp | patch | blob | history |
index a1363850dcbb21e3620882c5b0d2221e1468420b..2be0b928283aa82cf013473a2cb6b742298b1d5c 100644 (file)
GSList *temp_clip = NULL;
sp_selection_copy_impl (items, &temp_clip, NULL, NULL); // we're in the same doc, so no need to copy defs
sp_selection_delete_impl (items);
- GSList *copied = sp_selection_paste_impl (sp_desktop_document (dt), next, &temp_clip, NULL);
+ next=Inkscape::next_layer(dt->currentRoot(), dt->currentLayer()); // Fixes bug 1482973: crash while moving layers
+ GSList *copied;
+ if(next) {
+ copied = sp_selection_paste_impl (sp_desktop_document (dt), next, &temp_clip, NULL);
+ } else {
+ copied = sp_selection_paste_impl (sp_desktop_document (dt), dt->currentLayer(), &temp_clip, NULL);
+ }
selection->setReprList((GSList const *) copied);
g_slist_free (copied);
if (temp_clip) g_slist_free (temp_clip);
GSList *temp_clip = NULL;
sp_selection_copy_impl (items, &temp_clip, NULL, NULL); // we're in the same doc, so no need to copy defs
sp_selection_delete_impl (items);
- GSList *copied = sp_selection_paste_impl (sp_desktop_document (dt), next, &temp_clip, NULL);
+ next=Inkscape::previous_layer(dt->currentRoot(), dt->currentLayer()); // Fixes bug 1482973: crash while moving layers
+ GSList *copied;
+ if(next) {
+ copied = sp_selection_paste_impl (sp_desktop_document (dt), next, &temp_clip, NULL);
+ } else {
+ copied = sp_selection_paste_impl (sp_desktop_document (dt), dt->currentLayer(), &temp_clip, NULL);
+ }
selection->setReprList((GSList const *) copied);
g_slist_free (copied);
if (temp_clip) g_slist_free (temp_clip);