- fix: when open a project, and it's missing compiler set getten reset, it's modification flag is not correctly set.

This commit is contained in:
Roy Qu 2022-03-30 20:15:15 +08:00
parent 17516c8111
commit 461df394cb
3 changed files with 4 additions and 14 deletions

View File

@ -16,6 +16,7 @@ Red Panda C++ Version 1.0.2
- fix: can't stop a freeze program that has stdin redirected.
- enhancement: context menu for problem cases table
- fix: error in auto generate makefile under linux
- fix: when open a project, and it's missing compiler set getten reset, it's modification flag is not correctly set.
Red Panda C++ Version 1.0.1
- fix: only convert project icon file when it's filename doesn't end with ".ico"

View File

@ -2231,7 +2231,7 @@ bool WatchModel::hasChildren(const QModelIndex &parent) const
return true;
}
WatchVar* item = static_cast<WatchVar*>(parent.internalPointer());
return item->numChild>0;
return item->numChild>0 || item->hasMore;
}
RegisterModel::RegisterModel(QObject *parent):QAbstractTableModel(parent)

View File

@ -55,8 +55,8 @@ Project::Project(const QString &filename, const QString &name,
&EditorList::getContentFromOpenedEditor,mEditorList,
std::placeholders::_1, std::placeholders::_2));
if (name == DEV_INTERNAL_OPEN) {
open();
mModified = false;
open();
} else {
mName = name;
SimpleIni ini;
@ -1515,18 +1515,7 @@ void Project::loadOptions(SimpleIni& ini)
+tr("It will be substituted by the global compiler set."),
QMessageBox::Ok
);
mOptions.compilerSet = pSettings->compilerSets().defaultIndex();
int compilerSetType = ini.GetLongValue("Project","CompilerSetType",-1);
if (compilerSetType>=0) {
for (int i=0;i<pSettings->compilerSets().size();i++) {
Settings::PCompilerSet pSet = pSettings->compilerSets().getSet(i);
if (pSet && pSet->compilerSetType() == compilerSetType) {
mOptions.compilerSet = i;
break;
}
}
}
setModified(true);
setCompilerSet(pSettings->compilerSets().defaultIndex());
}
mOptions.compilerOptions = ini.GetValue("Project", "CompilerSettings", "");
mOptions.staticLink = ini.GetBoolValue("Project", "StaticLink", true);