mirror of
https://github.com/RGBCube/serenity
synced 2025-06-04 02:08:11 +00:00
LibGUI: Make Breadcrumbbar remember the selected segment index
We had a selected_segment() accessor, but the member it returned was never actually updated.
This commit is contained in:
parent
4bc3745ce6
commit
ff37ce7408
1 changed files with 2 additions and 0 deletions
|
@ -133,6 +133,8 @@ Optional<size_t> Breadcrumbbar::find_segment_with_data(String const& data)
|
||||||
|
|
||||||
void Breadcrumbbar::set_selected_segment(Optional<size_t> index)
|
void Breadcrumbbar::set_selected_segment(Optional<size_t> index)
|
||||||
{
|
{
|
||||||
|
m_selected_segment = index;
|
||||||
|
|
||||||
if (!index.has_value()) {
|
if (!index.has_value()) {
|
||||||
for_each_child_of_type<GUI::AbstractButton>([&](auto& button) {
|
for_each_child_of_type<GUI::AbstractButton>([&](auto& button) {
|
||||||
button.set_checked(false);
|
button.set_checked(false);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue