Fix layout bug detected thanks to dom_tests.

This commit is contained in:
ArthurSonzogni 2020-03-25 19:10:46 +01:00
parent 13d1cc1684
commit 20d4ee458a
2 changed files with 1 additions and 6 deletions

View File

@ -44,9 +44,6 @@ class HBox : public Node {
int x = box.x_min; int x = box.x_min;
for (auto& child : children) { for (auto& child : children) {
if (x > box.x_max)
break;
Box child_box = box; Box child_box = box;
child_box.x_min = x; child_box.x_min = x;

View File

@ -1,3 +1,4 @@
#include <iostream>
#include <algorithm> #include <algorithm>
#include "ftxui/dom/elements.hpp" #include "ftxui/dom/elements.hpp"
@ -44,9 +45,6 @@ class VBox : public Node {
int y = box.y_min; int y = box.y_min;
for (auto& child : children) { for (auto& child : children) {
if (y > box.y_max)
break;
Box child_box = box; Box child_box = box;
child_box.y_min = y; child_box.y_min = y;