diff options
author | Andreas Kling <kling@serenityos.org> | 2022-08-18 20:43:39 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-08-18 20:43:39 +0200 |
commit | ff37ce7408a5d049dd20a69f793e6fa291d6bcfa (patch) | |
tree | 6a1ab1f58cc0692b5d16ca832b560cebc1ef0fc1 /Userland/Libraries | |
parent | 4bc3745ce681e54c7f719fa5b98858c085b2f280 (diff) | |
download | serenity-ff37ce7408a5d049dd20a69f793e6fa291d6bcfa.zip |
LibGUI: Make Breadcrumbbar remember the selected segment index
We had a selected_segment() accessor, but the member it returned was
never actually updated.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibGUI/Breadcrumbbar.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/Breadcrumbbar.cpp b/Userland/Libraries/LibGUI/Breadcrumbbar.cpp index c2c7240d83..dfec0624ec 100644 --- a/Userland/Libraries/LibGUI/Breadcrumbbar.cpp +++ b/Userland/Libraries/LibGUI/Breadcrumbbar.cpp @@ -133,6 +133,8 @@ Optional<size_t> Breadcrumbbar::find_segment_with_data(String const& data) void Breadcrumbbar::set_selected_segment(Optional<size_t> index) { + m_selected_segment = index; + if (!index.has_value()) { for_each_child_of_type<GUI::AbstractButton>([&](auto& button) { button.set_checked(false); |