lmi-commits
[Top][All Lists]
Advanced

[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_;



reply via email to

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