summaryrefslogtreecommitdiffstats
path: root/src/ui/clipboard.cpp
diff options
context:
space:
mode:
authorJabiertxof <jabier.arraiza@marker.es>2019-09-16 14:41:18 +0000
committerJabiertxof <jabier.arraiza@marker.es>2019-09-16 14:41:18 +0000
commitc239b8d513fae662a4e3be85f85efb794d98d83d (patch)
treec2528a5760b21acc685f13cde3b5426284d6fc5b /src/ui/clipboard.cpp
parentAllow paste on flowbox at same sice of origin, also improve creation to get r... (diff)
downloadinkscape-c239b8d513fae662a4e3be85f85efb794d98d83d.tar.gz
inkscape-c239b8d513fae662a4e3be85f85efb794d98d83d.zip
Allow paste preserving new lines into a flowtext element
Diffstat (limited to 'src/ui/clipboard.cpp')
-rw-r--r--src/ui/clipboard.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp
index fb7bebc39..7341b8caf 100644
--- a/src/ui/clipboard.cpp
+++ b/src/ui/clipboard.cpp
@@ -65,6 +65,7 @@
#include "object/sp-rect.h"
#include "object/sp-root.h"
#include "object/sp-shape.h"
+#include "object/sp-flowtext.h"
#include "object/sp-textpath.h"
#include "object/sp-use.h"
#include "style.h"
@@ -1093,6 +1094,10 @@ bool ClipboardManagerImpl::_pasteText(SPDesktop *desktop)
if (textitem) {
textitem->hide_shape_inside();
}
+ SPFlowtext *flowtext = dynamic_cast<SPFlowtext *>(tc->text);
+ if (flowtext) {
+ flowtext->fix_overflow_flowregion(false);
+ }
// we realy only want to inherit container style
/* SPCSSAttr *css = take_style_from_item(tc->text);
for (int i = 0; i < nr_blocks; ++i)
@@ -1123,6 +1128,9 @@ bool ClipboardManagerImpl::_pasteText(SPDesktop *desktop)
if (textitem) {
textitem->show_shape_inside();
}
+ if (flowtext) {
+ flowtext->fix_overflow_flowregion(true);
+ }
}
return true;
}