summaryrefslogtreecommitdiff
path: root/src/library/flow.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-11-29 12:06:38 +0100
committerLaurenz <laurmaedje@gmail.com>2021-11-29 12:06:38 +0100
commite36b8ed374423816876273f30b77eee38cb8b74c (patch)
tree0fc976a6bc91c56926d4c9af1ce05cb0e0556a3e /src/library/flow.rs
parent50bd8634711507ead8491d8d0c2abad0481e6a83 (diff)
Layout bugfixes
Diffstat (limited to 'src/library/flow.rs')
-rw-r--r--src/library/flow.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/library/flow.rs b/src/library/flow.rs
index 587b5a80..9494d6c0 100644
--- a/src/library/flow.rs
+++ b/src/library/flow.rs
@@ -132,10 +132,6 @@ impl<'a> FlowLayouter<'a> {
/// Layout all children.
fn layout(mut self, ctx: &mut LayoutContext) -> Vec<Constrained<Rc<Frame>>> {
for child in self.children {
- if self.regions.is_full() {
- self.finish_region();
- }
-
match *child {
FlowChild::Spacing(Spacing::Linear(v)) => {
self.layout_absolute(v);
@@ -145,6 +141,10 @@ impl<'a> FlowLayouter<'a> {
self.fr += v;
}
FlowChild::Node(ref node) => {
+ if self.regions.is_full() {
+ self.finish_region();
+ }
+
self.layout_node(ctx, node);
}
}