Skip to content

Commit

Permalink
fixed disappearing labels (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
i3sey authored and IrneRacoonovich committed Aug 30, 2024
1 parent 957c2df commit 38da699
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ class SelectionOverlay : public tsl::Gui {
list->addItem(listItem);
} else {
listItem->setValue(footer);
listItem->setClickListener([count, this, listItem, helpPath](uint64_t keys) { // Add 'command' to the capture list
listItem->setClickListener([count, this, listItem, helpPath, footer](uint64_t keys) { // Add 'command' to the capture list
if (keys & KEY_A) {
if (listItem->getValue() == "APPLIED" && !prevValue.empty()) {
listItem->setValue(prevValue);
Expand All @@ -579,7 +579,7 @@ class SelectionOverlay : public tsl::Gui {
} else if (keys & KEY_Y && !helpPath.empty()) {
tsl::changeTo<HelpOverlay>(helpPath);
} else if (keys && (listItem->getValue() == "DONE" || listItem->getValue() == "FAIL")) {
listItem->setValue("");
listItem->setValue(footer);
}
return false;
});
Expand Down Expand Up @@ -644,7 +644,7 @@ class SelectionOverlay : public tsl::Gui {
}
return true;
} else if (keys && (listItem->getValue() == "DONE" || listItem->getValue() == "FAIL")) {
listItem->setValue("");
listItem->setValue(prevValue);
}
return false;
});
Expand Down Expand Up @@ -1208,7 +1208,7 @@ class SubMenu : public tsl::Gui {
}
}

listItem->setClickListener([command = option.second, keyName = headerName, subPath = this->subPath, usePattern, listItem, helpPath, useSlider](uint64_t keys) {
listItem->setClickListener([command = option.second, keyName = headerName, subPath = this->subPath, usePattern, listItem, helpPath, useSlider, footer](uint64_t keys) {
if (exitMT) {
// Means that commands was executed
threadClose(&threadMT);
Expand Down Expand Up @@ -1249,13 +1249,12 @@ class SubMenu : public tsl::Gui {
Mtrun = true;
}
} else if (keys & KEY_X) {
listItem->setValue("");
tsl::changeTo<ConfigOverlay>(subPath, keyName);
return true;
} else if (keys & KEY_Y && !helpPath.empty()) {
tsl::changeTo<HelpOverlay>(helpPath);
} else if (keys && (listItem->getValue() == "DONE" || listItem->getValue() == "FAIL")) {
listItem->setValue("");
listItem->setValue(footer);
}
return false;
}
Expand Down

0 comments on commit 38da699

Please sign in to comment.