summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2014-08-05 20:47:25 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-05 12:49:35 -0700
commitcec1ea182e49a855785b1437123ec85a713a879f (patch)
tree1059c7ce7b41058c4d71ed2b50d1212df352f570 /qt-ui
parent81125d190a216d5718e44a984aef62fc3d7d07fe (diff)
downloadsubsurface-cec1ea182e49a855785b1437123ec85a713a879f.tar.gz
Print: rename the variable 'isHeading' to 'newHeading'
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 <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/printlayout.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/qt-ui/printlayout.cpp b/qt-ui/printlayout.cpp
index 8fdee858f..f9b71d9b3 100644
--- a/qt-ui/printlayout.cpp
+++ b/qt-ui/printlayout.cpp
@@ -385,7 +385,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;
@@ -399,15 +399,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--;
}