diff options
author | corvid <corvid@lavabit.com> | 2009-10-26 23:04:46 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2009-10-26 23:04:46 +0000 |
commit | 0eb66f6846deba4deb54a586eba157593043ff45 (patch) | |
tree | 4c938173d7a47ab73af943a317181ab5a0650a14 /dw/textblock.cc | |
parent | 9389d4308c5730ba6fcf5e3b3cf2cffd8f176a79 (diff) |
let later space override previous space
The earlier space is less likely to be styled with the intended appearance.
Diffstat (limited to 'dw/textblock.cc')
-rw-r--r-- | dw/textblock.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc index 282ed1ad..65521b5a 100644 --- a/dw/textblock.cc +++ b/dw/textblock.cc @@ -1706,10 +1706,11 @@ void Textblock::addSpace (core::style::Style *style) // page->words[nw].eff_space); //DBG_OBJ_ARRSET_NUM (page, "words.%d.content.space", nw, // page->words[nw].content.space); - - words->getRef(nw)->spaceStyle->unref (); - words->getRef(nw)->spaceStyle = style; - style->ref (); + if (style != words->getRef(nw)->spaceStyle) { + words->getRef(nw)->spaceStyle->unref (); + words->getRef(nw)->spaceStyle = style; + style->ref (); + } } } } |