- fix: default file type in editor misc setting page not correctly setted

This commit is contained in:
royqh1979 2021-08-30 23:05:08 +08:00
parent 42029028fc
commit 63632b6012
2 changed files with 8 additions and 4 deletions

View File

@ -1217,9 +1217,9 @@ void DebugReader::processWatchOutput(PWatchVar watchVar)
parentVar = newVar; parentVar = newVar;
} }
} else if (nodeText.startsWith('}')) { // end of struct, change parent } else if (nodeText.startsWith('}')) { // end of struct, change parent
if (parentVar->parent!=nullptr) { if (parentVar->parent!=nullptr) {
parentVar = std::shared_ptr<WatchVar>(parentVar->parent); parentVar = std::shared_ptr<WatchVar>(parentVar->parent);
} }
} else { // next parent member/child } else { // next parent member/child
if (parentVar->text.isEmpty()) { // root node, replace text only if (parentVar->text.isEmpty()) { // root node, replace text only
parentVar->text = nodeText; parentVar->text = nodeText;

View File

@ -19,7 +19,11 @@ void EditorMiscWidget::doLoad()
{ {
ui->chkReadonlySystemHeaders->setChecked(pSettings->editor().readOnlySytemHeader()); ui->chkReadonlySystemHeaders->setChecked(pSettings->editor().readOnlySytemHeader());
ui->chkLoadLastFiles->setChecked(pSettings->editor().autoLoadLastFiles()); ui->chkLoadLastFiles->setChecked(pSettings->editor().autoLoadLastFiles());
ui->rbCppFile->setChecked(pSettings->editor().defaultFileCpp()); if (pSettings->editor().defaultFileCpp()) {
ui->rbCppFile->setChecked(true);
} else {
ui->rbCFile->setChecked(true);
}
} }
void EditorMiscWidget::doSave() void EditorMiscWidget::doSave()