aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/GenericStack.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2017-06-15 17:32:04 +0200
committerjpbruyere <jp.bruyere@hotmail.com>2017-06-15 17:32:04 +0200
commit1fdbaaf4ae209e26ef8767ae13ebb9aa9d1f79c7 (patch)
tree5586932c635ca68a67bddcb83918b74ecad79758 /src/GraphicObjects/GenericStack.cs
parent570f6f9b7c9ed25adf618b02f5cfe0f1b3e9afe7 (diff)
Revert "replace foreach loops with for ones"
This reverts commit 1c3263454961eb207a01b67c51d0acf88376d522.
Diffstat (limited to 'src/GraphicObjects/GenericStack.cs')
-rw-r--r--src/GraphicObjects/GenericStack.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/GraphicObjects/GenericStack.cs b/src/GraphicObjects/GenericStack.cs
index a21c903d..cecdaffd 100644
--- a/src/GraphicObjects/GenericStack.cs
+++ b/src/GraphicObjects/GenericStack.cs
@@ -97,18 +97,18 @@ namespace Crow
{
int d = 0;
if (Orientation == Orientation.Horizontal) {
- for (int i = 0; i < Children.Count; i++) {
- if (!Children[i].Visible)
+ foreach (GraphicObject c in Children) {
+ if (!c.Visible)
continue;
- Children[i].Slot.X = d;
- d += Children[i].Slot.Width + Spacing;
+ c.Slot.X = d;
+ d += c.Slot.Width + Spacing;
}
} else {
- for (int i = 0; i < Children.Count; i++) {
- if (!Children[i].Visible)
+ foreach (GraphicObject c in Children) {
+ if (!c.Visible)
continue;
- Children[i].Slot.Y = d;
- d += Children[i].Slot.Height + Spacing;
+ c.Slot.Y = d;
+ d += c.Slot.Height + Spacing;
}
}
IsDirty = true;