Call post_reshape when adding children to ui::single_container & ui::selector
This commit is contained in:
parent
88e48f2454
commit
dd87dadd2f
2 changed files with 7 additions and 0 deletions
|
|
@ -143,6 +143,8 @@ namespace psemek::ui
|
|||
submenu_.resize(size);
|
||||
child_boxes_.resize(size);
|
||||
children_range_.resize(size + 1);
|
||||
|
||||
post_reshape();
|
||||
}
|
||||
|
||||
std::size_t selector::add(std::shared_ptr<element> child)
|
||||
|
|
@ -153,6 +155,8 @@ namespace psemek::ui
|
|||
children_range_.push_back(child.get());
|
||||
child->set_parent(this);
|
||||
|
||||
post_reshape();
|
||||
|
||||
return children_.size() - 1;
|
||||
}
|
||||
|
||||
|
|
@ -178,6 +182,7 @@ namespace psemek::ui
|
|||
submenu_.clear();
|
||||
child_boxes_.clear();
|
||||
children_range_.assign(1, nullptr);
|
||||
post_reshape();
|
||||
}
|
||||
|
||||
geom::interval<float> selector::y_range(std::size_t index) const
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ namespace psemek::ui
|
|||
if (child_) child_->set_parent(this);
|
||||
children_[0] = child_.get();
|
||||
|
||||
post_reshape();
|
||||
|
||||
return old;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue