From 3ede3e4ce650e65860b93e9eae020b137e7c7105 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Tue, 21 Feb 2023 15:43:45 +0800 Subject: [PATCH] - change: Remove all breakpoints of the current non-project file, when it is closed. --- NEWS.md | 5 +++++ RedPandaIDE/RedPandaIDE.pro | 2 +- RedPandaIDE/editorlist.cpp | 3 ++- Red_Panda_CPP.pro | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/NEWS.md b/NEWS.md index 4726a6e9..4613fa66 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +Red Panda C++ Version 2.13 + + - change: Remove all breakpoints of the current non-project file, when it is closed. + + Red Panda C++ Version 2.13 - fix: Only C/C++/GAS files can set breakpoints. diff --git a/RedPandaIDE/RedPandaIDE.pro b/RedPandaIDE/RedPandaIDE.pro index 72050b95..deb1cda4 100644 --- a/RedPandaIDE/RedPandaIDE.pro +++ b/RedPandaIDE/RedPandaIDE.pro @@ -10,7 +10,7 @@ isEmpty(APP_NAME) { } isEmpty(APP_VERSION) { - APP_VERSION = 2.13 + APP_VERSION = 2.14 } macos: { diff --git a/RedPandaIDE/editorlist.cpp b/RedPandaIDE/editorlist.cpp index 03ee6193..c1319a3c 100644 --- a/RedPandaIDE/editorlist.cpp +++ b/RedPandaIDE/editorlist.cpp @@ -180,9 +180,10 @@ bool EditorList::closeEditor(Editor* editor, bool transferFocus, bool force) { PProjectUnit unit = pMainWindow->project()->findUnit(editor); pMainWindow->project()->closeUnit(unit); } else { - if (pMainWindow->visitHistoryManager()->addFile(editor->filename())) { + if (!editor->isNew() && pMainWindow->visitHistoryManager()->addFile(editor->filename())) { pMainWindow->rebuildOpenedFileHisotryMenu(); } + editor->clearBreakpoints(); doRemoveEditor(editor); } updateLayout(); diff --git a/Red_Panda_CPP.pro b/Red_Panda_CPP.pro index dc78a583..0c031466 100644 --- a/Red_Panda_CPP.pro +++ b/Red_Panda_CPP.pro @@ -14,7 +14,7 @@ qsynedit.subdir = libs/qsynedit APP_NAME = RedPandaCPP -APP_VERSION = 2.13 +APP_VERSION = 2.14 # Add the dependencies so that the RedPandaIDE project can add the depended programs # into the main app bundle