ad7da0d26dad — Sebastian Geerken 8 years ago
RTFL.
2 files changed, 8 insertions(+), 1 deletions(-)

M dw/textblock.cc
M dw/textblock_linebreaking.cc
M dw/textblock.cc +4 -0
@@ 213,6 213,7 @@ Textblock::Textblock (bool limitTextWidt
    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 @@ void Textblock::addParbreak (int space, 
                   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 @@ void Textblock::flush ()
 
       queueResize (-1, true);
       mustQueueResize = false;
+      DBG_OBJ_SET_BOOL ("mustQueueResize", mustQueueResize);
    }
 
    DBG_OBJ_LEAVE ();

          
M dw/textblock_linebreaking.cc +4 -1
@@ 452,6 452,7 @@ Textblock::Line *Textblock::addLine (int
                            line->contentDescent);
 
    mustQueueResize = true;
+   DBG_OBJ_SET_BOOL ("mustQueueResize", mustQueueResize);
 
    int xWidget = line->textOffset;
    int yLine = yOffsetOfLineCreated (line);

          
@@ 686,7 687,7 @@ int Textblock::wrapWordInFlow (int wordI
          }
       }
 
-      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 @@ int Textblock::wrapWordInFlow (int wordI
          // 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",