Skip to content
Permalink
Browse files
Merge pull request #10131 from malleoz/hotkey-syntax-fix
IOWindow: Do not accept on syntax errors
  • Loading branch information
leoetlino committed Oct 5, 2021
2 parents a6023c1 + 5563235 commit bf6a278
Showing 1 changed file with 6 additions and 4 deletions.
@@ -509,15 +509,17 @@ void IOWindow::OnDialogButtonPressed(QAbstractButton* button)
const auto lock = ControllerEmu::EmulatedController::GetStateLock();

UpdateExpression(m_expression_text->toPlainText().toStdString());
m_original_expression = m_reference->GetExpression();

if (ciface::ExpressionParser::ParseStatus::SyntaxError == m_reference->GetParseStatus())
{
ModalMessageBox::warning(this, tr("Error"), tr("The expression contains a syntax error."));
}

// must be the OK button
accept();
else
{
// must be the OK button
m_original_expression = m_reference->GetExpression();
accept();
}
}

void IOWindow::OnDetectButtonPressed()

0 comments on commit bf6a278

Please sign in to comment.