mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 07:45:33 +01:00
Do not update hotkey assignments on window close
If this commit is not applied, then the previous commit will cause hotkeys to be saved if there is a syntax error when hitting "OK" and the user presses the X to close the window. This commit only applies changes to hotkey config if no syntax error occurs.
This commit is contained in:
parent
242bce27a1
commit
556323561c
@ -509,7 +509,6 @@ 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())
|
||||||
{
|
{
|
||||||
@ -518,6 +517,7 @@ void IOWindow::OnDialogButtonPressed(QAbstractButton* button)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// must be the OK button
|
// must be the OK button
|
||||||
|
m_original_expression = m_reference->GetExpression();
|
||||||
accept();
|
accept();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user