Skip to content

Commit 064c779

Browse files
author
Bjoern Kerler
committed
Ensure that footer is updated in footer settings menu on removal
Update
1 parent 310b7f8 commit 064c779

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Diff for: src/gui/footer/footer_line.cpp

+8-1
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,17 @@ bool FooterLine::Create(footer::Item item_id, size_t index) {
4444

4545
auto &item = items[index];
4646

47-
const bool result = [&]<typename... Rec>(TypeList<Rec...>) -> bool {
47+
if (item_id == footer::Item::none) {
48+
items[index].emplace<std::monostate>();
49+
return false;
50+
}
51+
52+
bool result = [&]<typename... Rec>(TypeList<Rec...>) -> bool {
4853
return (((item_id == Rec::item && !std::holds_alternative<typename Rec::T>(item)) ? item.emplace<typename Rec::T>(this), true : false) || ...);
4954
}(footer::FooterItemMappings());
5055

56+
result |= (item_id == footer::Item::none && std::holds_alternative<std::monostate>(item) ? item.emplace<std::monostate>(), true : false);
57+
5158
if (result) {
5259
positionWindows();
5360
}

0 commit comments

Comments
 (0)