changeset 4649:ad7da0d26dad

RTFL.
author Sebastian Geerken
date So, 17 Jul 2016 11:42:33 +0200
parents bbd0bdde0e01
children da460fb294e3
files dw/textblock.cc dw/textblock_linebreaking.cc
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dw/textblock.cc	Sa Jul 16 22:53:09 2016 -0400
+++ b/dw/textblock.cc	So Jul 17 11:42:33 2016 +0200
@@ -213,6 +213,7 @@
    line1Offset = 0;
    ignoreLine1OffsetSometimes = false;
    mustQueueResize = false;
+   DBG_OBJ_SET_BOOL ("mustQueueResize", mustQueueResize);
    redrawY = 0;
    DBG_OBJ_SET_NUM ("redrawY", redrawY);
    lastWordDrawn = -1;
@@ -2753,6 +2754,8 @@
                   word2->content.breakSpace = space;
                   textblock2->queueResize (makeParentRefInFlow (lineno), false);
                   textblock2->mustQueueResize = false;
+                  DBG_OBJ_SET_BOOL_O (textblock2, "mustQueueResize",
+                                      textblock2->mustQueueResize);
                }
             }
             return;
@@ -2945,6 +2948,7 @@
 
       queueResize (-1, true);
       mustQueueResize = false;
+      DBG_OBJ_SET_BOOL ("mustQueueResize", mustQueueResize);
    }
 
    DBG_OBJ_LEAVE ();
--- a/dw/textblock_linebreaking.cc	Sa Jul 16 22:53:09 2016 -0400
+++ b/dw/textblock_linebreaking.cc	So Jul 17 11:42:33 2016 +0200
@@ -452,6 +452,7 @@
                            line->contentDescent);
 
    mustQueueResize = true;
+   DBG_OBJ_SET_BOOL ("mustQueueResize", mustQueueResize);
 
    int xWidget = line->textOffset;
    int yLine = yOffsetOfLineCreated (line);
@@ -686,7 +687,7 @@
          }
       }
 
-      if(!newLine && !wrapAll)
+      if(!newLine && !wrapAll) {
          // No new line is added. "mustQueueResize" must,
          // nevertheless, be set, so that flush() will call
          // queueResize(), and later sizeRequestImpl() is called,
@@ -694,6 +695,8 @@
          // calls this method again, with wrapAll == true, so that
          // newLine is calculated as "true".
          mustQueueResize = true;
+         DBG_OBJ_SET_BOOL ("mustQueueResize", mustQueueResize);
+      }
 
       PRINTF ("[%p] special case? newLine = %s, wrapAll = %s => "
               "mustQueueResize = %s\n", this, newLine ? "true" : "false",