Skip to content

Commit

Permalink
refinements
Browse files Browse the repository at this point in the history
  • Loading branch information
djowel committed Feb 19, 2024
1 parent e35ae0a commit 377379a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/include/elements/view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,15 @@ namespace cycfi { namespace elements
auto i = std::find(_content.begin(), _content.end(), e);
if (i != _content.end())
{
end_focus();
refresh(*e);
if (e->wants_focus())
{
end_focus();
refresh(*e);
}
_content.erase(i);
_content.reset();
layout();
_is_focus = _main_element.focus();
}
}
);
Expand Down

0 comments on commit 377379a

Please sign in to comment.