From 20d4ee458ab17e17ecc347dbfd8c3be87edd5eab Mon Sep 17 00:00:00 2001 From: ArthurSonzogni Date: Wed, 25 Mar 2020 19:10:46 +0100 Subject: [PATCH] Fix layout bug detected thanks to dom_tests. --- src/ftxui/dom/hbox.cpp | 3 --- src/ftxui/dom/vbox.cpp | 4 +--- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/ftxui/dom/hbox.cpp b/src/ftxui/dom/hbox.cpp index c97ab0e..efc0a3f 100644 --- a/src/ftxui/dom/hbox.cpp +++ b/src/ftxui/dom/hbox.cpp @@ -44,9 +44,6 @@ class HBox : public Node { int x = box.x_min; for (auto& child : children) { - if (x > box.x_max) - break; - Box child_box = box; child_box.x_min = x; diff --git a/src/ftxui/dom/vbox.cpp b/src/ftxui/dom/vbox.cpp index cc61866..2e173b4 100644 --- a/src/ftxui/dom/vbox.cpp +++ b/src/ftxui/dom/vbox.cpp @@ -1,3 +1,4 @@ +#include #include #include "ftxui/dom/elements.hpp" @@ -44,9 +45,6 @@ class VBox : public Node { int y = box.y_min; for (auto& child : children) { - if (y > box.y_max) - break; - Box child_box = box; child_box.y_min = y;