diff --git a/NEWS.md b/NEWS.md index 9eaf8ecf..7c6407d2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ Version 0.6.3 - fix: should use c++ syntax to check ".h" files + - fix: can't copy contents in a readonly editor + - fix: project's file not correctly syntaxed when open in editor Version 0.6.2 - fix: The Enter key in the numpad doesn't work diff --git a/RedPandaIDE/editor.cpp b/RedPandaIDE/editor.cpp index db40570a..9fb4fe4b 100644 --- a/RedPandaIDE/editor.cpp +++ b/RedPandaIDE/editor.cpp @@ -2842,9 +2842,19 @@ void Editor::setInProject(bool newInProject) return; mInProject = newInProject; if (mInProject) { - initParser(); - } else { mParser = pMainWindow->project()->cppParser(); + if (isVisible()) { + if (mParser && mParser->parsing()) { + connect(mParser.get(), + &CppParser::onEndParsing, + this, + &SynEdit::invalidate); + } else { + invalidate(); + } + } + } else { + initParser(); } } diff --git a/RedPandaIDE/qsynedit/SynEdit.cpp b/RedPandaIDE/qsynedit/SynEdit.cpp index 09d5f1c9..bf178471 100644 --- a/RedPandaIDE/qsynedit/SynEdit.cpp +++ b/RedPandaIDE/qsynedit/SynEdit.cpp @@ -5047,7 +5047,7 @@ void SynEdit::ExecuteCommand(SynEditorCommand Command, QChar AChar, void *pData) doCutToClipboard(); break; case SynEditorCommand::ecCopy: - if (!mReadOnly && selAvail()) + if (selAvail()) doCopyToClipboard(); break; case SynEditorCommand::ecPaste: diff --git a/RedPandaIDE/systemconsts.h b/RedPandaIDE/systemconsts.h index 7ed77c39..470f34c6 100644 --- a/RedPandaIDE/systemconsts.h +++ b/RedPandaIDE/systemconsts.h @@ -3,7 +3,7 @@ #include -#define DEVCPP_VERSION "0.6.1" +#define DEVCPP_VERSION "0.6.3" #ifdef Q_OS_WIN #define APP_SETTSINGS_FILENAME "redpandacpp.ini"