[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 86ed6fe 01/13: Correct a comment

From: Greg Chicares
Subject: [lmi-commits] [lmi] master 86ed6fe 01/13: Correct a comment
Date: Tue, 8 May 2018 19:51:05 -0400 (EDT)

branch: master
commit 86ed6fe27d7118d30c28780d0c9828a85d3dc607
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Correct a comment
    Hidden columns are often, but not always, skipped when iterating across
    columns. In particular, do_get_cell_x() and output_horz_separator()
    accumulate column widths without skipping hidden columns. Therefore,
    it is imperative to set hidden columns' widths to zero.
 wx_table_generator.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/wx_table_generator.cpp b/wx_table_generator.cpp
index c0960c0..25c8b07 100644
--- a/wx_table_generator.cpp
+++ b/wx_table_generator.cpp
@@ -285,8 +285,10 @@ void wx_table_generator::add_column
-    // If a column's header is empty, then it is to be hidden--so its
-    // width isn't used and may as well be initialized to zero.
+    // If a column's header is empty, then it is to be hidden--and its
+    // width must be initialized to zero, because other member functions
+    // calculate total width by accumulating the widths of all columns,
+    // whether hidden or not.
     int width = 0;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]