mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 07:09:48 -06:00
Merge pull request #10131 from malleoz/hotkey-syntax-fix
IOWindow: Do not accept on syntax errors
This commit is contained in:
@ -509,15 +509,17 @@ void IOWindow::OnDialogButtonPressed(QAbstractButton* button)
|
|||||||
const auto lock = ControllerEmu::EmulatedController::GetStateLock();
|
const auto lock = ControllerEmu::EmulatedController::GetStateLock();
|
||||||
|
|
||||||
UpdateExpression(m_expression_text->toPlainText().toStdString());
|
UpdateExpression(m_expression_text->toPlainText().toStdString());
|
||||||
m_original_expression = m_reference->GetExpression();
|
|
||||||
|
|
||||||
if (ciface::ExpressionParser::ParseStatus::SyntaxError == m_reference->GetParseStatus())
|
if (ciface::ExpressionParser::ParseStatus::SyntaxError == m_reference->GetParseStatus())
|
||||||
{
|
{
|
||||||
ModalMessageBox::warning(this, tr("Error"), tr("The expression contains a syntax error."));
|
ModalMessageBox::warning(this, tr("Error"), tr("The expression contains a syntax error."));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
// must be the OK button
|
{
|
||||||
accept();
|
// must be the OK button
|
||||||
|
m_original_expression = m_reference->GetExpression();
|
||||||
|
accept();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IOWindow::OnDetectButtonPressed()
|
void IOWindow::OnDetectButtonPressed()
|
||||||
|
Reference in New Issue
Block a user