mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-06-24 16:21:12 +08:00
Fix bug with "flex" element not settings their box.
This commit is contained in:
parent
a3cc6df32b
commit
25476f757b
@ -163,6 +163,7 @@ class VerticalContainer : public ContainerBase {
|
||||
return false;
|
||||
}
|
||||
|
||||
int old_selected = *selector_;
|
||||
if (event.mouse().button == Mouse::WheelUp) {
|
||||
MoveSelector(-1);
|
||||
}
|
||||
@ -171,7 +172,7 @@ class VerticalContainer : public ContainerBase {
|
||||
}
|
||||
*selector_ = std::max(0, std::min(int(children_.size()) - 1, *selector_));
|
||||
|
||||
return true;
|
||||
return old_selected != *selector_;
|
||||
}
|
||||
|
||||
Box box_;
|
||||
|
@ -80,6 +80,7 @@ class Flex : public Node {
|
||||
}
|
||||
|
||||
void SetBox(Box box) override {
|
||||
Node::SetBox(box);
|
||||
if (children_.empty()) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user