summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2024-05-29 21:39:15 +0000
committerFedja Beader <fedja@protonmail.ch>2024-05-29 21:39:15 +0000
commit9997ec1609f1855368d4f5fd320a5a2600508f54 (patch)
treed23d23480224f00c43b1850d2e7f86a518409dff
parent5570d9d1c2b1b5fba50283ec443088430332bb86 (diff)
downloadmanaverse-9997ec1609f1855368d4f5fd320a5a2600508f54.tar.gz
manaverse-9997ec1609f1855368d4f5fd320a5a2600508f54.tar.bz2
manaverse-9997ec1609f1855368d4f5fd320a5a2600508f54.tar.xz
manaverse-9997ec1609f1855368d4f5fd320a5a2600508f54.zip
Fix paste in registration window
Addendum to cbab9d6d "Fix for login button" See also mana/plus!67 and mana/plus#64 **** mana/plus!86
-rw-r--r--src/gui/windows/registerdialog.cpp15
-rw-r--r--src/gui/windows/registerdialog.h2
2 files changed, 8 insertions, 9 deletions
diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp
index 40a0e472c..588ca0074 100644
--- a/src/gui/windows/registerdialog.cpp
+++ b/src/gui/windows/registerdialog.cpp
@@ -157,6 +157,12 @@ RegisterDialog::~RegisterDialog()
delete2(mWrongDataNoticeListener)
}
+void RegisterDialog::logic()
+{
+ mRegisterButton->setEnabled(canSubmit());
+ Window::logic();
+}
+
void RegisterDialog::action(const ActionEvent &event)
{
const std::string &eventId = event.getId();
@@ -289,11 +295,6 @@ void RegisterDialog::action(const ActionEvent &event)
void RegisterDialog::keyPressed(KeyEvent &event)
{
- if (event.isConsumed())
- {
- mRegisterButton->setEnabled(canSubmit());
- return;
- }
const InputActionT actionId = event.getActionId();
if (actionId == InputAction::GUI_CANCEL)
{
@@ -304,10 +305,6 @@ void RegisterDialog::keyPressed(KeyEvent &event)
{
action(ActionEvent(nullptr, mRegisterButton->getActionEventId()));
}
- else
- {
- mRegisterButton->setEnabled(canSubmit());
- }
}
bool RegisterDialog::canSubmit() const
diff --git a/src/gui/windows/registerdialog.h b/src/gui/windows/registerdialog.h
index 6249253f8..139739780 100644
--- a/src/gui/windows/registerdialog.h
+++ b/src/gui/windows/registerdialog.h
@@ -62,6 +62,8 @@ class RegisterDialog final : public Window,
void postInit() override;
+ void logic() override final;
+
/**
* Called when receiving actions from the widgets.
*/