From 95b52b43f8ea1e296b2900cad6387049be6003bc Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Wed, 27 Apr 2022 13:00:40 -0400 Subject: [PATCH] Prevent logging in with the return key even though login is disabled --- src/launcherwindow.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/launcherwindow.cpp b/src/launcherwindow.cpp index 2076dae..fc3eb04 100644 --- a/src/launcherwindow.cpp +++ b/src/launcherwindow.cpp @@ -244,11 +244,13 @@ LauncherWindow::LauncherWindow(LauncherCore& core, QWidget* parent) : QMainWindo registerButton = new QPushButton("Register"); connect(otpEdit, &QLineEdit::returnPressed, [this] { - this->core.assetUpdater->update(currentProfile()); + if(loginButton->isEnabled()) + this->core.assetUpdater->update(currentProfile()); }); connect(passwordEdit, &QLineEdit::returnPressed, [this] { - this->core.assetUpdater->update(currentProfile()); + if(loginButton->isEnabled()) + this->core.assetUpdater->update(currentProfile()); }); auto emptyWidget = new QWidget();