diff options
author | Sebastian Geerken <devnull@localhost> | 2016-06-18 12:57:45 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2016-06-18 12:57:45 +0200 |
commit | 3c968cc06f7a1a4b314a1eb1c46556fdbdc5e584 (patch) | |
tree | e44d33eb2532bd580806c2f0f844e6de7f7c9b41 /dw/textblock.cc | |
parent | 5216fc855eb8f8b9a4f8c76e1cc05c70bca899e1 (diff) |
Documentation and comments on Jorge's patch.
Diffstat (limited to 'dw/textblock.cc')
-rw-r--r-- | dw/textblock.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc index f851fd4e..dbf6e8e1 100644 --- a/dw/textblock.cc +++ b/dw/textblock.cc @@ -3034,6 +3034,14 @@ void Textblock::queueDrawRange (int index1, int index2) void Textblock::updateReference (int ref) { + // The condition "(lines->size () > 0)" prevents CPU hogging in some cases, + // see devdoc/dw-miscellaneous.doc, "Relation between + // dw::core::Widget::markSizeChange and dw::core::Widget::queueResize". + // + // This condition is safe, since an implementation of + // dw::oof::OOFAwareWidget::updateReference should only affect content in + // flow, not widgets out of flow, like floats. + if (lines->size () > 0) queueResize (ref, false); } |