[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 4e69646 4/6: Work around the problem analyzed
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 4e69646 4/6: Work around the problem analyzed in the preceding commit |
Date: |
Wed, 22 Aug 2018 19:18:24 -0400 (EDT) |
branch: master
commit 4e696460fd29c55e1076b5070b5b2b6b6de05a6a
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Work around the problem analyzed in the preceding commit
Replaced text_rect() with cell_rect() where the latter was apparently
intended (after reverting the preceding commit). To see the net change,
with this commit checked out:
git diff --word-diff-regex='[a-z]+' 16128296^
---
wx_table_generator.cpp | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/wx_table_generator.cpp b/wx_table_generator.cpp
index a361d0b..c5232d2 100644
--- a/wx_table_generator.cpp
+++ b/wx_table_generator.cpp
@@ -23,7 +23,6 @@
#include "wx_table_generator.hpp"
-#include "alert.hpp"
#include "assert_lmi.hpp"
#include "miscellany.hpp" // count_newlines(), split_into_lines()
#include "ssize_lmi.hpp"
@@ -209,25 +208,15 @@ void wx_table_generator::output_super_header
}
// We don't have a function for getting the rectangle of a span of columns,
- // but we can reuse the existing text_rect() if we just increase its width
+ // but we can reuse the existing cell_rect() if we just increase its width
// by the width of all the extra (i.e. not counting the starting one)
// columns in this span.
- auto rect = text_rect(begin_column, pos_y);
+ auto rect = cell_rect(begin_column, pos_y);
rect.width += cell_pos_x(end_column) - cell_pos_x(begin_column + 1);
for(auto const& i : lines)
{
-// LMI_ASSERT(dc().GetTextExtent(i).x <= rect.width);
- if(rect.width < dc().GetTextExtent(i).x)
- {
- warning()
- << "Super-header transgresses its rectangle:\n"
- << "'" << i << "' super-header text\n"
- << dc().GetTextExtent(i).x << " dc().GetTextExtent(i).x\n"
- << rect.width << " rect.width\n"
- << LMI_FLUSH
- ;
- }
+ 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, 2018/08/22
- [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 <=
- [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