From 2a84679f7c8b083d4047084a50258ec5ed5ae1bb Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Tue, 8 Mar 2022 20:36:30 +0800 Subject: [PATCH] - fix: save project's layout shouldn't modify the project file --- NEWS.md | 1 + RedPandaIDE/project.cpp | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/NEWS.md b/NEWS.md index 337d4c95..4353f954 100644 --- a/NEWS.md +++ b/NEWS.md @@ -21,6 +21,7 @@ Red Panda C++ Version 0.14.5 - fix: undo one symbol completion as a whole operation - fix: crash when open a project that contains custom folder - enhancement: symbol completion when editor has selection + - fix: save project's layout shouldn't modify the project file Red Panda C++ Version 0.14.4 - enhancement: git - log diff --git a/RedPandaIDE/project.cpp b/RedPandaIDE/project.cpp index 33acc3e0..11488049 100644 --- a/RedPandaIDE/project.cpp +++ b/RedPandaIDE/project.cpp @@ -474,16 +474,16 @@ void Project::saveLayout() layIni.SetLongValue(groupName,"LeftChar", editor->leftChar()); } // remove old data from project file - SimpleIni ini; - ini.LoadFile(filename().toLocal8Bit()); - groupName = toByteArray(QString("Unit%1").arg(i+1)); - ini.Delete(groupName,"Open"); - ini.Delete(groupName,"Top"); - ini.Delete(groupName,"CursorCol"); - ini.Delete(groupName,"CursorRow"); - ini.Delete(groupName,"TopLine"); - ini.Delete(groupName,"LeftChar"); - ini.SaveFile(filename().toLocal8Bit()); +// SimpleIni ini; +// ini.LoadFile(filename().toLocal8Bit()); +// groupName = toByteArray(QString("Unit%1").arg(i+1)); +// ini.Delete(groupName,"Open"); +// ini.Delete(groupName,"Top"); +// ini.Delete(groupName,"CursorCol"); +// ini.Delete(groupName,"CursorRow"); +// ini.Delete(groupName,"TopLine"); +// ini.Delete(groupName,"LeftChar"); +// ini.SaveFile(filename().toLocal8Bit()); } layIni.SaveFile(changeFileExt(filename(), "layout").toLocal8Bit()); }