From 2d1d813e2dc392d2480a2dc9cdf61ce6330db72d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Thu, 27 May 2004 17:26:27 +0000 Subject: [PATCH] fixed indentation in case there's only one cell on line git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27469 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/html/htmlcell.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/html/htmlcell.cpp b/src/html/htmlcell.cpp index 37514300b3..4747a35f43 100644 --- a/src/html/htmlcell.cpp +++ b/src/html/htmlcell.cpp @@ -775,7 +775,7 @@ void wxHtmlContainerCell::Layout(int w) // between two cells separated by, e.g. font change, cell which // is wrong - const int step = s_width - xpos; + int step = s_width - xpos; if ( step > 0 ) { // first count the cells which will get extra space @@ -818,8 +818,14 @@ void wxHtmlContainerCell::Layout(int w) } } } + else + { + // this will cause the code to enter "else branch" below: + step = 0; + } } - else // no extra space to distribute + // else branch: + if ( step <= 0 ) // no extra space to distribute { // just set the indent properly while (line != cell)