diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2017-02-02 11:44:11 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2017-02-02 11:44:11 +0000 |
| commit | d23c0c4531bce94ebc8bd1f12dc976b691aa72f7 (patch) | |
| tree | ffb94cdc790191de3abba75554ee59f0afcb7500 /src/widgets/text-toolbar.cpp | |
| parent | Enable setting of default 'font-style'. (diff) | |
| download | inkscape-d23c0c4531bce94ebc8bd1f12dc976b691aa72f7.tar.gz inkscape-d23c0c4531bce94ebc8bd1f12dc976b691aa72f7.zip | |
Fix line-height conversions between no unit and 'em' unit.
(bzr r15465)
Diffstat (limited to 'src/widgets/text-toolbar.cpp')
| -rw-r--r-- | src/widgets/text-toolbar.cpp | 5 |
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; |
