From 6f3ca5805b5b6825d9218bb6683319a85704dc0d Mon Sep 17 00:00:00 2001 From: Ilya Sinitsyn Date: Wed, 13 Mar 2019 21:03:59 +0700 Subject: [PATCH] Fix wrapsizer min size calculation Fix the `wxWrapSizer::CalcMinFromMinor` function: at the end of the calculation a `sumMinor` variable contain minor size sum without minor size of a last line, so add `maxMinor` size to the result min size. --- src/common/wrapsizer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/wrapsizer.cpp b/src/common/wrapsizer.cpp index 155eb95341..0efdbbaa9d 100644 --- a/src/common/wrapsizer.cpp +++ b/src/common/wrapsizer.cpp @@ -465,7 +465,11 @@ void wxWrapSizer::CalcMinFromMinor(int totMinor) // No spill over? if ( !tailSize ) + { + // Add minor size of the last line + sumMinor += maxMinor; break; + } } // Now have min size in the opposite direction