fix the not working checkboxes

This commit is contained in:
mrbesen 2022-10-02 23:46:11 +02:00
parent dd01c70230
commit 53d642f507
Signed by untrusted user: MrBesen
GPG Key ID: 596B2350DCD67504
2 changed files with 2 additions and 5 deletions

View File

@ -32,7 +32,7 @@ void LolAutoAccept::setChamps(const std::vector<uint32_t>& champs, State s) {
} }
void LolAutoAccept::setEnabled(bool b, State s) { void LolAutoAccept::setEnabled(bool b, State s) {
if(s >= State::PICK) { if(s > State::PICK) {
Log::warn << "setEnabled() called on invalid State"; Log::warn << "setEnabled() called on invalid State";
return; return;
} }

View File

@ -92,10 +92,7 @@ void MainWindow::smitewarntoggled(bool state) {
void MainWindow::tabtoggled(Position p, LolAutoAccept::State s, bool state) { void MainWindow::tabtoggled(Position p, LolAutoAccept::State s, bool state) {
Log::info << "checkbox toggled " << state << " position: " << p << " state: " << (int) s; Log::info << "checkbox toggled " << state << " position: " << p << " state: " << (int) s;
if(s == LolAutoAccept::State::LOBBY) { lolaa.setEnabled(state, s);
lolaa.setEnabled(state, s);
}
lolaa.reload(); lolaa.reload();
} }