diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2016-07-16 19:41:35 -0400 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2016-07-16 19:41:35 -0400 |
commit | bf740c18a68e61a1a88ac1c78862e6e50d5186a3 (patch) | |
tree | eba2737dba84081d4aac69279a1403c9b598976b /dw | |
parent | 5bbb6755f5e54308b88d27121b07dd6b0c0c368c (diff) |
Optimize Textblock::updateReference.
This helps to avoid unnecessary resize calls.
Diffstat (limited to 'dw')
-rw-r--r-- | dw/textblock.cc | 3 |
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) |