summaryrefslogtreecommitdiff
path: root/dw
diff options
context:
space:
mode:
authorJorge Arellano Cid <jcid@dillo.org>2016-07-16 19:41:35 -0400
committerJorge Arellano Cid <jcid@dillo.org>2016-07-16 19:41:35 -0400
commitbf740c18a68e61a1a88ac1c78862e6e50d5186a3 (patch)
treeeba2737dba84081d4aac69279a1403c9b598976b /dw
parent5bbb6755f5e54308b88d27121b07dd6b0c0c368c (diff)
Optimize Textblock::updateReference.
This helps to avoid unnecessary resize calls.
Diffstat (limited to 'dw')
-rw-r--r--dw/textblock.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc
index 53a1de24..58b3347b 100644
--- a/dw/textblock.cc
+++ b/dw/textblock.cc
@@ -3040,7 +3040,8 @@ void Textblock::queueDrawRange (int index1, int index2)
void Textblock::updateReference (int ref)
{
- queueResize (ref, false);
+ if (words->size () > 0)
+ queueResize (ref, false);
}
void Textblock::widgetRefSizeChanged (int externalIndex)