Revert "ecere:Stacker: fixed spring feature not properly implemented for all directio...
authorJerome St-Louis <jerome@ecere.com>
Fri, 14 Oct 2011 06:11:54 +0000 (02:11 -0400)
committerJerome St-Louis <jerome@ecere.com>
Fri, 14 Oct 2011 06:11:54 +0000 (02:11 -0400)
The Stacker is used in the crucial GlobalSettingsDialog and is not a place for experimental code. Segfaults and Memory leaks causing a major setbacks in the IDE's useability. The OnResize() implementation is way too complicated and prone to such problems.

This reverts commit 832efbbe6f459a49c76700af9b09ab46cb8f50b9.

ecere/src/gui/controls/Stacker.ec

index 99cafb1..747c72b 100644 (file)
@@ -424,20 +424,10 @@ private:
             }
             if(spring == previous && previousChild)
             {
-               if(direction == vertical)
-               {
-                  if(reverse)
-                     previousChild.anchor.top = y;
-                  else
-                     previousChild.anchor.bottom = y;
-               }
+               if(reverse)
+                  previousChild.anchor.left = y;
                else
-               {
-                  if(reverse)
-                     previousChild.anchor.left = y;
-                  else
-                     previousChild.anchor.right = y;
-               }
+                  previousChild.anchor.right = y;
             }
 
             controlsDirA.Free();