Skip to content

Commit 0161cda

Browse files
committed
only focus if not focused
1 parent 0241c3b commit 0161cda

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Source/Managers/ConsoleMan.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,10 @@ void ConsoleMan::Update() {
295295
}
296296

297297
if (!m_ReadOnly) {
298-
m_InputTextBox->SetEnabled(true);
299-
m_InputTextBox->SetFocus();
298+
if (!m_InputTextBox->GetEnabled() || !m_InputTextBox->HasFocus()) {
299+
m_InputTextBox->SetEnabled(true);
300+
m_InputTextBox->SetFocus();
301+
}
300302

301303
if (!m_InputLog.empty() && !g_UInputMan.FlagCtrlState()) {
302304
if (g_UInputMan.KeyPressed(SDLK_UP)) {

0 commit comments

Comments
 (0)