diff --git a/lib/redeyereduction/redeyereductiontool.cpp b/lib/redeyereduction/redeyereductiontool.cpp --- a/lib/redeyereduction/redeyereductiontool.cpp +++ b/lib/redeyereduction/redeyereductiontool.cpp @@ -182,7 +182,13 @@ void RedEyeReductionTool::keyPressEvent(QKeyEvent* event) { - QDialogButtonBox *buttons = d->mToolWidget->mainDialogButtonBox; + QDialogButtonBox *buttons; + if (d->mStatus == Adjusting) { + buttons = d->mToolWidget->mainDialogButtonBox; + } else { + buttons = d->mToolWidget->helpDialogButtonBox; + } + switch (event->key()) { case Qt::Key_Escape: event->accept(); @@ -194,7 +200,7 @@ auto focusButton = static_cast(buttons->focusWidget()); if (focusButton && buttons->buttonRole(focusButton) == QDialogButtonBox::RejectRole) { buttons->rejected(); - } else if (d->mStatus == Adjusting) { + } else { buttons->accepted(); } break;