diff options
author | Fedja Beader <fedja@protonmail.ch> | 2024-05-29 21:39:15 +0000 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2024-05-29 21:39:15 +0000 |
commit | 9997ec1609f1855368d4f5fd320a5a2600508f54 (patch) | |
tree | d23d23480224f00c43b1850d2e7f86a518409dff /src | |
parent | 5570d9d1c2b1b5fba50283ec443088430332bb86 (diff) | |
download | plus-9997ec1609f1855368d4f5fd320a5a2600508f54.tar.gz plus-9997ec1609f1855368d4f5fd320a5a2600508f54.tar.bz2 plus-9997ec1609f1855368d4f5fd320a5a2600508f54.tar.xz plus-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
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/windows/registerdialog.cpp | 15 | ||||
-rw-r--r-- | src/gui/windows/registerdialog.h | 2 |
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. */ |