Revision: 4314 http://vexi.svn.sourceforge.net/vexi/?rev=4314&view=rev Author: clrg Date: 2012-01-06 08:51:34 +0000 (Fri, 06 Jan 2012) Log Message: ----------- Fix bug exposed by Resize trap where calling setConstrain() during reflow left the box tree in an inconsistent state. (This bug is a few years old!)
Modified Paths: -------------- trunk/org.vexi-core.main/src/main/jpp/org/vexi/core/Box.jpp Property Changed: ---------------- trunk/org.vexi-core.main/ Property changes on: trunk/org.vexi-core.main ___________________________________________________________________ Modified: svn:ignore - src_gen bin _vexi_test _temp_ src_gen* .classpath .project gen .settings build lib ebuild.configuration release .configuration .configuration gen .classpath .project .settings .configuration gen .classpath .project .settings .configuration gen .classpath .project .settings .configuration gen .classpath .project .settings .configuration gen .classpath .project .settings .configuration gen .classpath .project .settings + src_gen bin _vexi_test _temp_ src_gen* .classpath .project gen .settings build lib ebuild.configuration release .configuration .configuration gen .classpath .project .settings .configuration gen .classpath .project .settings .configuration gen .classpath .project .settings .configuration gen .classpath .project .settings .configuration gen .classpath .project .settings .configuration gen .classpath .project .settings .configuration gen .classpath .project .settings .configuration gen .classpath .project .settings .configuration gen .classpath .project .settings Modified: trunk/org.vexi-core.main/src/main/jpp/org/vexi/core/Box.jpp =================================================================== --- trunk/org.vexi-core.main/src/main/jpp/org/vexi/core/Box.jpp 2012-01-06 07:26:27 UTC (rev 4313) +++ trunk/org.vexi-core.main/src/main/jpp/org/vexi/core/Box.jpp 2012-01-06 08:51:34 UTC (rev 4314) @@ -599,6 +599,9 @@ private void constrain() { int i; if (test(CONSTRAIN_DESCENDENT)) { + // clear first, because it is possible + // that reflow may lead to more reflow + clear(CONSTRAIN_DESCENDENT); // reconstrain any children for (Box c = getChild(i=0); c != null; c = getChild(++i)) { if (!c.test(DISPLAY)) { @@ -606,13 +609,12 @@ } c.constrain(); } - clear(CONSTRAIN_DESCENDENT); } // REMARK: must happen after children's sizes known // otherwise any update is immediately invalidated if (test(RESIZE_TRAP)) { - justTriggerTrapsAndCatchExceptions(SC_Resize, JSU.T); + justTriggerTrapsAndCatchExceptions(SC_Resize, JSU.T);)) } // no reconstrain necessary @@ -1680,8 +1682,7 @@ reflow(); return null; case "reflow": - set(CONSTRAIN); - requestReflow(); + setConstrain(); return null; case "render": reflow(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn