- change: position caret to (1,1) when create a new file using editor's new file template

This commit is contained in:
Roy Qu 2022-06-23 20:39:00 +08:00
parent b2585f567a
commit 5557d9c103
2 changed files with 2 additions and 0 deletions

View File

@ -6,6 +6,7 @@ Red Panda C++ Version 1.1.2
- fix: select all shouldn't set file's modified flag - fix: select all shouldn't set file's modified flag
- enhancement: add (return)type info for functions/varaibles/typedefs in the class browser panel - enhancement: add (return)type info for functions/varaibles/typedefs in the class browser panel
- enhancement: autolink add "force utf8" property (mainly for raylib) - enhancement: autolink add "force utf8" property (mainly for raylib)
- change: position caret to (1,1) when create a new file using editor's new file template
Red Panda C++ Version 1.1.1 Red Panda C++ Version 1.1.1
- enhancement: adjust the appearance of problem case's input/output/expected control - enhancement: adjust the appearance of problem case's input/output/expected control

View File

@ -165,6 +165,7 @@ Editor::Editor(QWidget *parent, const QString& filename,
QString fileTemplate = pMainWindow->codeSnippetManager()->newFileTemplate(); QString fileTemplate = pMainWindow->codeSnippetManager()->newFileTemplate();
if (!fileTemplate.isEmpty()) { if (!fileTemplate.isEmpty()) {
insertCodeSnippet(fileTemplate); insertCodeSnippet(fileTemplate);
setCaretPosition(1,1);
mCanAutoSave = true; mCanAutoSave = true;
} }
} }