[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 6330347 2/6: Assert an apparent requirement
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 6330347 2/6: Assert an apparent requirement |
Date: |
Wed, 22 Aug 2018 19:18:24 -0400 (EDT) |
branch: master
commit 63303472b3b40d26dbbad36a3d5d07c6b8d3180e
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Assert an apparent requirement
Experimentally, in never-to-be-committed local changes, changed spacing
between columns to 7em, and observed some "super" headers (those that
span multiple columns) superimposed one over another. Because this has
not been observed in production, concluded that they must all fit within
disjoint bounding boxes. Asserted this, because it is important to know
if this invariant is broken by any future change.
---
wx_table_generator.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/wx_table_generator.cpp b/wx_table_generator.cpp
index bac5acf..f7ee1df 100644
--- a/wx_table_generator.cpp
+++ b/wx_table_generator.cpp
@@ -216,6 +216,7 @@ void wx_table_generator::output_super_header
for(auto const& i : lines)
{
+ LMI_ASSERT(dc().GetTextExtent(i).x <= rect.width);
dc_.DrawLabel(i, rect, wxALIGN_CENTER_HORIZONTAL);
rect.y += row_height_;
pos_y += row_height_;
- [lmi-commits] [lmi] master updated (d5a3be5 -> 4da8dbb), Greg Chicares, 2018/08/22
- [lmi-commits] [lmi] master 6330347 2/6: Assert an apparent requirement,
Greg Chicares <=
- [lmi-commits] [lmi] master 1612829 3/6: Investigate failure of the assertion just added, Greg Chicares, 2018/08/22
- [lmi-commits] [lmi] master 4e69646 4/6: Work around the problem analyzed in the preceding commit, Greg Chicares, 2018/08/22
- [lmi-commits] [lmi] master 4da8dbb 6/6: Remove parallel implementation and its associated assertion, Greg Chicares, 2018/08/22
- [lmi-commits] [lmi] master 3f962fd 1/6: Make minimum margin a set_column_widths() argument, Greg Chicares, 2018/08/22
- [lmi-commits] [lmi] master f0673e0 5/6: Fix the problem analyzed in the penultimate commit, Greg Chicares, 2018/08/22