summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows')
-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.
*/