]> git.lyx.org Git - lyx.git/commitdiff
Partly revert r21987 which caused alignment problems.
authorAbdelrazak Younes <younes@lyx.org>
Fri, 7 Dec 2007 21:57:56 +0000 (21:57 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Fri, 7 Dec 2007 21:57:56 +0000 (21:57 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22004 a592a061-630c-0410-9148-cb99ea01b6c8

src/TextMetrics.cpp

index 8321b34ecadd030585ea06824e13f3dbfafbeb6b..4fa2857ad6156baf4f3cba0a960b179bf6ed5f36 100644 (file)
@@ -553,9 +553,9 @@ void TextMetrics::computeRowMetrics(pit_type const pit,
        }
 
        double hfill = 0;
-       if (w > 0) {
-               // are there any hfills in the row?
-               if (int nh = numberOfHfills(par, row))
+       // are there any hfills in the row?
+       if (int const nh = numberOfHfills(par, row)) {
+               if (w > 0)
                        hfill = w / double(nh);
        // we don't have to look at the alignment if it is ALIGN_LEFT and
        // if the row is already larger then the permitted width as then