Do not accept on hotkey syntax errors

Previously you could type whatever gibberish you wanted into the formula bar, press OK, and receive a modal syntax error window. Closing the syntax error window would cause the hotkey config window to close as well, and your gibberish would be applied to the hotkey assignment.

This commit requires that a syntax error does not occur before accept() is called.
This commit is contained in:
sowens99 2021-09-27 14:28:08 -04:00
parent 753a1595bf
commit 242bce27a1
1 changed files with 5 additions and 3 deletions

View File

@ -515,9 +515,11 @@ void IOWindow::OnDialogButtonPressed(QAbstractButton* button)
{
ModalMessageBox::warning(this, tr("Error"), tr("The expression contains a syntax error."));
}
// must be the OK button
accept();
else
{
// must be the OK button
accept();
}
}
void IOWindow::OnDetectButtonPressed()