Revision: 3826
          http://vexi.svn.sourceforge.net/vexi/?rev=3826&view=rev
Author:   clrg
Date:     2010-03-26 16:06:30 +0000 (Fri, 26 Mar 2010)

Log Message:
-----------
Fix a solving problem for total min-child.contentwidths was greater than 
available width

Modified Paths:
--------------
    trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp

Modified: trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp
===================================================================
--- trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp  2010-03-26 08:17:38 UTC 
(rev 3825)
+++ trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp  2010-03-26 16:06:30 UTC 
(rev 3826)
@@ -782,11 +782,6 @@
                             if (numactive==0) {
                                 return;
                             }
-                            // no solution required - avaiable max sizes do 
not consume width
-                            if (num_maxsize+num_passive==numactive && 
(int)(total+0.5)<=width) {
-                                targetsize = width;
-                                break;
-                            }
                             // test to see if targetsize produces a solution 
that rounds
                             // to match the width, adjusting appropriatly if 
it does not
                             int itotal = (int)(total+0.5);
@@ -794,12 +789,22 @@
                                 if (numflexible>0) {
                                     targetsize -= 
(total-(float)width)/(float)numflexible;
                                 } else {
+                                    if (num_minsize+num_passive==numactive) {
+                                        // no solution required - avaiable 
min-sizes over-consume width
+                                        targetsize = width;
+                                        break;
+                                    }
                                     targetsize = (float)max_maxsize - 
(total-(float)width)/(float)num_maxsize;
                                 }
                             } else if (itotal < width) {
                                 if (numflexible>0) {
                                     targetsize += 
((float)width-total)/(float)numflexible;
                                 } else {
+                                    if (num_maxsize+num_passive==numactive) {
+                                        // no solution required - avaiable 
max-sizes do not consume width
+                                        targetsize = width;
+                                        break;
+                                    }
                                     targetsize = (float)min_minsize + 
((float)width-total)/(float)num_minsize;
                                 }
                             } else {
@@ -912,11 +917,6 @@
                             if (numactive==0) {
                                 return;
                             }
-                            // no solution required - avaiable max sizes do 
not consume height
-                            if (num_maxsize+num_passive==numactive && 
(int)(total+0.5)<=height) {
-                                targetsize = height;
-                                break;
-                            }
                             // test to see if targetsize produces a solution 
that rounds
                             // to match the height, adjusting appropriatly if 
it does not
                             int itotal = (int)(total+0.5);
@@ -924,12 +924,22 @@
                                 if (numflexible>0) {
                                     targetsize -= 
(total-(float)height)/(float)numflexible;
                                 } else {
+                                    // no solution required - avaiable 
min-sizes over-consume height
+                                    if (num_minsize+num_passive==numactive) {
+                                        targetsize = height;
+                                        break;
+                                    }
                                     targetsize = (float)max_maxsize - 
(total-(float)height)/(float)num_maxsize;
                                 }
                             } else if (itotal < height) {
                                 if (numflexible>0) {
                                     targetsize += 
((float)height-total)/(float)numflexible;
                                 } else {
+                                    // no solution required - avaiable 
max-sizes do not consume height
+                                    if (num_maxsize+num_passive==numactive) {
+                                        targetsize = height;
+                                        break;
+                                    }
                                     targetsize = (float)min_minsize + 
((float)height-total)/(float)num_minsize;
                                 }
                             } else {


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to