Skip to content

Commit

Permalink
cla-140: Fix for controls not properly positioned with layers (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebasconp authored Jan 10, 2025
1 parent 9b82eb6 commit baf139c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion code/classeine-lib/clsn/ui/container.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ namespace clsn::ui
{
control.set_parent_control(*this);

// TODO(ETO): Add a scope guard here
std::ignore = control.add_visible_changed_listener(
[this](auto&)
{
Expand Down
6 changes: 5 additions & 1 deletion code/classeine-lib/clsn/ui/layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@ namespace clsn::ui
{
std::ignore = add_position_changed_listener(
[this](auto& e)
{ get_control().set_actual_position(e.get_new_value()); });
{
auto& ctrl = get_control();
ctrl.set_actual_position(e.get_new_value());
ctrl.do_layout();
});
}

void layer_base::set_next_layer(
Expand Down

0 comments on commit baf139c

Please sign in to comment.