[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
{
LMI_ASSERT(!column_widths_already_computed_);
- // 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;
if(!header.empty())
{
- [lmi-commits] [lmi] master updated (05e57fd -> 0c90de6), Greg Chicares, 2018/05/08
- [lmi-commits] [lmi] master 1480161 06/13: Add more detail to a comment, Greg Chicares, 2018/05/08
- [lmi-commits] [lmi] master bb36d25 02/13: Assert that measure-only and render passes have the same side effects, Greg Chicares, 2018/05/08
- [lmi-commits] [lmi] master 86ed6fe 01/13: Correct a comment,
Greg Chicares <=
- [lmi-commits] [lmi] master fad1828 03/13: Explicitly assert some implicit assumptions, Greg Chicares, 2018/05/08
- [lmi-commits] [lmi] master b0c3633 05/13: Improve documentation, Greg Chicares, 2018/05/08
- [lmi-commits] [lmi] master d5096d9 11/13: Paste out to spreadsheet: show dates as YYYYMMDD, Greg Chicares, 2018/05/08
- [lmi-commits] [lmi] master d92a865 09/13: Grow only multiline "Comments" control, Greg Chicares, 2018/05/08
- [lmi-commits] [lmi] master a5d5799 10/13: Widen all date-picker controls, Greg Chicares, 2018/05/08
- [lmi-commits] [lmi] master 274f13e 04/13: Assert that the clipping width is nonnegative, Greg Chicares, 2018/05/08
- [lmi-commits] [lmi] master 6ac7331 07/13: Use a dummy name for a dummy variable, Greg Chicares, 2018/05/08
- [lmi-commits] [lmi] master 0c90de6 13/13: Designate release candidate 20180508T2349Z, Greg Chicares, 2018/05/08
- [lmi-commits] [lmi] master 7320efb 08/13: Adjust layout of certain controls, Greg Chicares, 2018/05/08
- [lmi-commits] [lmi] master fb91253 12/13: Revert "Store the last selected page of MvcController persistently", Greg Chicares, 2018/05/08