diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2019-08-29 20:34:06 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2019-08-29 20:34:06 +0000 |
| commit | 719b90d62fe152b9ff7f08133d0bb7016c4194f2 (patch) | |
| tree | 725bed1090b75349cd01916a29d74a99046ec085 /src/ui/clipboard.cpp | |
| parent | Remove warnings on de/activate (diff) | |
| download | inkscape-719b90d62fe152b9ff7f08133d0bb7016c4194f2.tar.gz inkscape-719b90d62fe152b9ff7f08133d0bb7016c4194f2.zip | |
add improvements to selectors and merge stylesheet on copy to work between docs
Diffstat (limited to 'src/ui/clipboard.cpp')
| -rw-r--r-- | src/ui/clipboard.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp index 4362c2b94..b9e7dc2b5 100644 --- a/src/ui/clipboard.cpp +++ b/src/ui/clipboard.cpp @@ -24,6 +24,7 @@ #include <glib/gstdio.h> // for g_file_set_contents etc., used in _onGet and paste #include "inkgc/gc-core.h" #include "xml/repr.h" +#include "xml/sp-css-attr.h" #include "inkscape.h" #include "desktop.h" @@ -753,6 +754,12 @@ void ClipboardManagerImpl::_copySelection(ObjectSet *selection) // copy complete inherited style SPCSSAttr *css = sp_repr_css_attr_inherited(obj, "style"); + for (auto iter : item->style->properties()) { + if (iter->style_src == SP_STYLE_SRC_STYLE_SHEET) { + Glib::ustring val = iter->get_value(); + css->setAttribute(iter->name, val.c_str()); + } + } sp_repr_css_set(obj_copy, css, "style"); sp_repr_css_attr_unref(css); @@ -923,7 +930,6 @@ void ClipboardManagerImpl::_copyUsedDefs(SPItem *item) } } - /** * Copy a single gradient to the clipboard's defs element. */ |
