Fix Restoring "Show Disassembly as" in Preferences (Fix #2726, #2748)

This commit is contained in:
Maria 2021-09-11 14:19:05 +03:00 committed by GitHub
parent 77c22b37c8
commit 40fa86c8ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,6 +96,16 @@ void AsmOptionsWidget::updateAsmOptionsFromVars()
bool varsubEnabled = Config()->getConfigBool("asm.sub.var");
ui->varsubOnlyCheckBox->setEnabled(varsubEnabled);
ui->asmComboBox->blockSignals(true);
if (Config()->getConfigBool("asm.esil")) {
ui->asmComboBox->setCurrentIndex(1);
} else if (Config()->getConfigBool("asm.pseudo")) {
ui->asmComboBox->setCurrentIndex(2);
} else {
ui->asmComboBox->setCurrentIndex(0);
}
ui->asmComboBox->blockSignals(false);
QString currentSyntax = Config()->getConfigString("asm.syntax");
for (int i = 0; i < ui->syntaxComboBox->count(); i++) {
if (ui->syntaxComboBox->itemData(i) == currentSyntax) {