From: "Lubomir I. Ivanov" <[email protected]>

This better describes what the variable (flag) does.
It's used to inform the loop that the last row goes
our of the page limit and that we need to place a new heading
on a new page. In that context 'newHeading' is more meaningful.
The name 'isHeading' is confusing for (i == 0), since it remains
'false' yet the 0 index row is actually a heading.

Signed-off-by: Lubomir I. Ivanov <[email protected]>
---
 qt-ui/printlayout.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/qt-ui/printlayout.cpp b/qt-ui/printlayout.cpp
index 6fe4102..0530abc 100644
--- a/qt-ui/printlayout.cpp
+++ b/qt-ui/printlayout.cpp
@@ -376,7 +376,7 @@ void PrintLayout::printTable()
         * two should be enough! */
        const int passes[] = { 70, 10 };
        int tableHeight = 0, lastAccIndex = 0, rowH, accH, headings, 
headingRowHeightD2, headingRowHeight;
-       bool isHeading = false;
+       bool newHeading = false;
 
        for (unsigned int pass = 0; pass < sizeof(passes) / sizeof(passes[0]); 
pass++) {
                progress = headings = accH = 0;
@@ -390,15 +390,15 @@ void PrintLayout::printTable()
                        if (rowH > pageH - headingRowHeight) // skip huge rows. 
we don't support row spanning on multiple pages.
                                continue;
                        accH += rowH;
-                       if (isHeading) {
+                       if (newHeading) {
                                headings += rowH;
-                               isHeading = false;
+                               newHeading = false;
                        }
                        if (accH > pageH) {
                                lastAccIndex = i;
                                pageIndexes.append(pageIndexes.last() + (accH - 
rowH));
                                addTablePrintHeadingRow(&model, i);
-                               isHeading = true;
+                               newHeading = true;
                                accH = 0;
                                i--;
                        }
-- 
1.7.11.msysgit.0

_______________________________________________
subsurface mailing list
[email protected]
http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to