diff options
| author | bulia byak <buliabyak@gmail.com> | 2006-05-09 01:14:55 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2006-05-09 01:14:55 +0000 |
| commit | f56b23d79e2947fdb916f3c641a2d3bbe365944c (patch) | |
| tree | b9f7d2c85381b8b3f8e8702ce28c7a83481823b5 /src | |
| parent | update changelog (diff) | |
| download | inkscape-f56b23d79e2947fdb916f3c641a2d3bbe365944c.tar.gz inkscape-f56b23d79e2947fdb916f3c641a2d3bbe365944c.zip | |
patch from Niko Kiirala for bug 1482973
(bzr r781)
Diffstat (limited to 'src')
| -rw-r--r-- | src/selection-chemistry.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index a1363850d..2be0b9282 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -1230,7 +1230,13 @@ void sp_selection_to_next_layer () 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); @@ -1262,7 +1268,13 @@ void sp_selection_to_prev_layer () 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); |
