Skip to content

Commit 2408cc4

Browse files
committed
Remove redundant PageMode checks in STT_UnlockTip parser
1 parent b4847cf commit 2408cc4

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

src/text/textparser.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,11 @@ void TextParser::ParseStringToken<STT_SetLeftMargin>(const StringToken& token) {
142142

143143
template <>
144144
void TextParser::ParseStringToken<STT_UnlockTip>(const StringToken& token) {
145-
if ((PageMode == DPM_ADV ||
146-
(ScrWork[SW_MESWIN0TYPE] == 1 && PageMode == DPM_REV) ||
147-
PageMode == DPM_NVL) &&
148-
TipsSystem::GetTipLockedState(token.Val_Uint16)) {
149-
TipsSystem::SetTipLockedState(token.Val_Uint16, false);
150-
TipsNotification::AddTip(token.Val_Uint16);
151-
TipsSystem::GetNewTipsIndices().push_back(token.Val_Uint16);
152-
}
145+
if (!TipsSystem::GetTipLockedState(token.Val_Uint16)) return;
146+
147+
TipsSystem::SetTipLockedState(token.Val_Uint16, false);
148+
TipsNotification::AddTip(token.Val_Uint16);
149+
TipsSystem::GetNewTipsIndices().push_back(token.Val_Uint16);
153150
}
154151

155152
template <>

0 commit comments

Comments
 (0)