diff --git a/NEWS.md b/NEWS.md index fd871abf..912d9178 100644 --- a/NEWS.md +++ b/NEWS.md @@ -8,6 +8,7 @@ Red Panda C++ Version 2.9 - enhancement: Auto backup editing contents. (Save editing contents 3 seconds after input stopped. Auto delete when editor successfully closed) - enhancement: Add "Auto backup editing contents" option in options/editor/auto save - fix: rename project file will wrongly set it's encoding to 'ASCII'; + - fix: Project's file encoding is wrongly set to 'AUTO' when load project. Red Panda C++ Version 2.8 diff --git a/RedPandaIDE/project.cpp b/RedPandaIDE/project.cpp index ddd8a9ec..3cb33524 100644 --- a/RedPandaIDE/project.cpp +++ b/RedPandaIDE/project.cpp @@ -238,7 +238,7 @@ void Project::open() newUnit->setBuildCmd(fromByteArray(ini.GetValue(groupName,"BuildCmd", ""))); QByteArray defaultEncoding = toByteArray(mOptions.encoding); //Compatibility - if (ini.GetBoolValue(groupName,"DetectEncoding",true)){ + if (ini.GetBoolValue(groupName,"DetectEncoding",false)){ defaultEncoding = ENCODING_AUTO_DETECT; } @@ -767,7 +767,6 @@ bool Project::saveUnits() ini.SetValue(groupName,"FileEncoding", toByteArray(unit->encoding())); else ini.Delete(groupName,"FileEncoding"); - } ini.SetLongValue("Project","UnitCount",count); ini.SaveFile(mFilename.toLocal8Bit()); diff --git a/RedPandaIDE/settings.cpp b/RedPandaIDE/settings.cpp index c5ec06ee..1b5e22e1 100644 --- a/RedPandaIDE/settings.cpp +++ b/RedPandaIDE/settings.cpp @@ -1519,7 +1519,7 @@ void Settings::Editor::doLoad() mSyntaxCheckWhenLineChanged = boolValue("check_syntax_when_line_changed",true); //auto save - mEnableEditTempBackup = boolValue("enable_edit_temp_backup",true); + mEnableEditTempBackup = boolValue("enable_edit_temp_backup", false); mEnableAutoSave = boolValue("enable_auto_save",false); mAutoSaveInterval = intValue("auto_save_interal",10); mAutoSaveTarget = static_cast(