Skip to content

Commit

Permalink
Update Soldering.cpp
Browse files Browse the repository at this point in the history
optimize lock/unlock display information
  • Loading branch information
neon12345 authored Jul 31, 2024
1 parent 80217ef commit 6a2f2dc
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions source/Core/Threads/UI/logic/Soldering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ OperatingMode handleSolderingButtons(const ButtonState buttons, guiContext *cxt)
if (warnUser(translatedString(Tr->UnlockingKeysString), buttons)) {
cxt->scratch_state.state1 = 1;
}
} else {
warnUser(translatedString(Tr->WarningKeysLockedString), buttons);
}
break;
case BUTTON_NONE:
Expand Down Expand Up @@ -54,10 +56,15 @@ OperatingMode handleSolderingButtons(const ButtonState buttons, guiContext *cxt)
cxt->transitionMode = TransitionAnimation::Left;
return OperatingMode::TemperatureAdjust;
case BUTTON_BOTH_LONG:
if (getSettingValue(SettingsOptions::LockingMode) && warnUser(translatedString(Tr->LockingKeysString), buttons)) {
if (getSettingValue(SettingsOptions::LockingMode)) {
// Lock buttons
if (cxt->scratch_state.state1 == 0) {
cxt->scratch_state.state1 = 2;
if (warnUser(translatedString(Tr->LockingKeysString), buttons)) {
cxt->scratch_state.state1 = 2;
}
} else {
// FIXME should be WarningKeysUnlockedString
warnUser(translatedString(Tr->UnlockingKeysString), buttons);
}
}
break;
Expand Down

0 comments on commit 6a2f2dc

Please sign in to comment.