summaryrefslogtreecommitdiff
path: root/dw/textblock.cc
diff options
context:
space:
mode:
Diffstat (limited to 'dw/textblock.cc')
-rw-r--r--dw/textblock.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc
index 88175665..c468c879 100644
--- a/dw/textblock.cc
+++ b/dw/textblock.cc
@@ -3044,8 +3044,17 @@ void Textblock::queueDrawRange (int index1, int index2)
void Textblock::updateReference (int ref)
{
- if (words->size () > 0)
+ DBG_OBJ_ENTER ("resize", 0, "updateReference", "%d", ref);
+
+ // This method can be optimized: nothing must be done when (i) there are no
+ // words, *and* (ii) there is no float clearance. If the second is not the
+ // case, `queueResize` must still be called, since `extraSpace.top` may be
+ // changed.
+
+ if (!(words->size () == 0 && getStyle()->clear == core::style::CLEAR_NONE))
queueResize (ref, false);
+
+ DBG_OBJ_LEAVE ();
}
void Textblock::widgetRefSizeChanged (int externalIndex)