diff options
| author | su_v <suv-sf@users.sourceforge.net> | 2014-08-04 15:29:44 +0000 |
|---|---|---|
| committer | ~suv <suv-sf@users.sourceforge.net> | 2014-08-04 15:29:44 +0000 |
| commit | b70edbea3adc1d80307ac2efaf01181a504191e3 (patch) | |
| tree | a376cbf2f7dd28073ab89b15a897a135fdcbe0f6 /src/ui/clipboard.cpp | |
| parent | update to trunk (r13472) (diff) | |
| parent | Exporting. Fix for bug #1350897 (XAML export formats numbers in the top-level... (diff) | |
| download | inkscape-b70edbea3adc1d80307ac2efaf01181a504191e3.tar.gz inkscape-b70edbea3adc1d80307ac2efaf01181a504191e3.zip | |
update to trunk (r13488)
(bzr r13398.1.6)
Diffstat (limited to 'src/ui/clipboard.cpp')
| -rw-r--r-- | src/ui/clipboard.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp index 8e2502545..1209b19cd 100644 --- a/src/ui/clipboard.cpp +++ b/src/ui/clipboard.cpp @@ -601,6 +601,12 @@ Glib::ustring ClipboardManagerImpl::getPathParameter(SPDesktop* desktop) */ Glib::ustring ClipboardManagerImpl::getShapeOrTextObjectId(SPDesktop *desktop) { + // https://bugs.launchpad.net/inkscape/+bug/1293979 + // basically, when we do a depth-first search, we're stopping + // at the first object to be <svg:path> or <svg:text>. + // but that could then return the id of the object's + // clip path or mask, not the original path! + SPDocument *tempdoc = _retrieveClipboard(); // any target will do here if ( tempdoc == NULL ) { _userWarn(desktop, _("Nothing on the clipboard.")); @@ -608,6 +614,9 @@ Glib::ustring ClipboardManagerImpl::getShapeOrTextObjectId(SPDesktop *desktop) } Inkscape::XML::Node *root = tempdoc->getReprRoot(); + // 1293979: strip out the defs of the document + root->removeChild(tempdoc->getDefs()->getRepr()); + Inkscape::XML::Node *repr = sp_repr_lookup_name(root, "svg:path", -1); // unlimited search depth if ( repr == NULL ) { repr = sp_repr_lookup_name(root, "svg:text", -1); |
