[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 274f13e 04/13: Assert that the clipping width
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 274f13e 04/13: Assert that the clipping width is nonnegative |
Date: |
Tue, 8 May 2018 19:51:05 -0400 (EDT) |
branch: master
commit 274f13ecf3d49d341ebf67527acfefc64f9ef572
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Assert that the clipping width is nonnegative
See the "wxDCClipper" discussion here:
https://lists.nongnu.org/archive/html/lmi/2018-04/msg00135.html
---
wx_table_generator.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/wx_table_generator.cpp b/wx_table_generator.cpp
index 4c24db4..87dca47 100644
--- a/wx_table_generator.cpp
+++ b/wx_table_generator.cpp
@@ -678,6 +678,14 @@ void wx_table_generator::do_output_values
if(ci.needs_clipping())
{
+ // It is assumed that the width of the "Participant" column
+ // on a group quote was initially zero, and then was expanded
+ // by some positive amount, and then incremented by one times
+ // the margin (not two times the margin as for other columns,
+ // because this column has only a left-hand unlateral margin).
+ // Make sure that any failure in this chain of assumptions
+ // doesn't result in (undefined) negative clipping.
+ LMI_ASSERT(0 <= ci.col_width() - column_margin());
wxDCClipper clip
(dc_
,wxRect
- [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, 2018/05/08
- [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 <=
- [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