summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2017-02-02 11:44:11 +0000
committertavmjong-free <tavmjong@free.fr>2017-02-02 11:44:11 +0000
commitd23c0c4531bce94ebc8bd1f12dc976b691aa72f7 (patch)
treeffb94cdc790191de3abba75554ee59f0afcb7500 /src/widgets
parentEnable setting of default 'font-style'. (diff)
downloadinkscape-d23c0c4531bce94ebc8bd1f12dc976b691aa72f7.tar.gz
inkscape-d23c0c4531bce94ebc8bd1f12dc976b691aa72f7.zip
Fix line-height conversions between no unit and 'em' unit.
(bzr r15465)
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/text-toolbar.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp
index e766b3510..e070c84d9 100644
--- a/src/widgets/text-toolbar.cpp
+++ b/src/widgets/text-toolbar.cpp
@@ -730,7 +730,10 @@ static void sp_text_lineheight_unit_changed( gpointer /* */, GObject *tbl )
auto itemlist = selection->items();
// Convert between units
- if ((unit->abbr == "" || unit->abbr == "em") && old_unit == SP_CSS_UNIT_EX) {
+ if ((unit->abbr == "" || unit->abbr == "em") &&
+ (old_unit == SP_CSS_UNIT_NONE || old_unit == SP_CSS_UNIT_EM)) {
+ // Do nothing
+ } else if ((unit->abbr == "" || unit->abbr == "em") && old_unit == SP_CSS_UNIT_EX) {
line_height *= 0.5;
} else if ((unit->abbr) == "ex" && (old_unit == SP_CSS_UNIT_EM || old_unit == SP_CSS_UNIT_NONE) ) {
line_height *= 2.0;