summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/clipboard.cpp7
-rw-r--r--src/ui/tools/text-tool.cpp9
2 files changed, 12 insertions, 4 deletions
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp
index 078dfc125..fb7bebc39 100644
--- a/src/ui/clipboard.cpp
+++ b/src/ui/clipboard.cpp
@@ -1093,7 +1093,8 @@ bool ClipboardManagerImpl::_pasteText(SPDesktop *desktop)
if (textitem) {
textitem->hide_shape_inside();
}
- SPCSSAttr *css = take_style_from_item(tc->text);
+ // we realy only want to inherit container style
+ /* SPCSSAttr *css = take_style_from_item(tc->text);
for (int i = 0; i < nr_blocks; ++i)
{
gchar const *w = sp_repr_css_property(css, "font-size", "0px");
@@ -1102,7 +1103,7 @@ bool ClipboardManagerImpl::_pasteText(SPDesktop *desktop)
if (w && strcmp(w, "0px") != 0) {
sp_repr_css_set_property(te_selected_style[i], "font-size", w);
}
- }
+ } */
for (unsigned int i = 0; i < text.length(); ++i)
it.prevCharacter();
@@ -1114,7 +1115,7 @@ bool ClipboardManagerImpl::_pasteText(SPDesktop *desktop)
for (unsigned int j = te_selected_style_positions[i]; j < te_selected_style_positions[i+1]; ++j)
it_next.nextCharacter();
- sp_te_apply_style(tc->text, it, it_next, te_selected_style[i]);
+ // sp_te_apply_style(tc->text, it, it_next, te_selected_style[i]);
te_update_layout_now_recursive(tc->text);
for (unsigned int j = te_selected_style_positions[i]; j < te_selected_style_positions[i+1]; ++j)
it.nextCharacter();
diff --git a/src/ui/tools/text-tool.cpp b/src/ui/tools/text-tool.cpp
index a9a66d64f..161b20aa2 100644
--- a/src/ui/tools/text-tool.cpp
+++ b/src/ui/tools/text-tool.cpp
@@ -685,7 +685,14 @@ bool TextTool::root_handler(GdkEvent* event) {
/* Set style */
sp_desktop_apply_style_tool(desktop, ft->getRepr(), "/tools/text", true);
-
+ SPCSSAttr *css = sp_repr_css_attr(ft->getRepr(), "style" );
+ Geom::Affine const local(ft->i2doc_affine());
+ double const ex(local.descrim());
+ if ( (ex != 0.0) && (ex != 1.0) ) {
+ sp_css_attr_scale(css, 1/ex);
+ }
+ ft->setCSS(css,"style");
+ sp_repr_css_attr_unref(css);
ft->updateRepr();
desktop->getSelection()->set(ft);