From e9f19dc73287d101d234ae12733a35d9e8a831ef Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 15 Feb 2012 10:50:02 +1100 Subject: Bug #3487440. Fix bug where setting an indicator on for whole document had no effect since that was regarded as an empty indicator. --- src/Decoration.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Decoration.cxx b/src/Decoration.cxx index 24632d7c1..b489c3c02 100644 --- a/src/Decoration.cxx +++ b/src/Decoration.cxx @@ -28,7 +28,7 @@ Decoration::~Decoration() { } bool Decoration::Empty() { - return rs.Runs() == 1; + return (rs.Runs() == 1) && (rs.AllSameAs(0)); } DecorationList::DecorationList() : currentIndicator(0), currentValue(1), current(0), @@ -148,7 +148,7 @@ void DecorationList::DeleteRange(int position, int deleteLength) { void DecorationList::DeleteAnyEmpty() { Decoration *deco = root; while (deco) { - if (deco->Empty()) { + if ((lengthDocument == 0) || deco->Empty()) { Delete(deco->indicator); deco = root; } else { -- cgit v1.2.3