diff --git a/NEWS.md b/NEWS.md index c2f2efdf..84d3f6d2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,9 @@ +Red Panda C++ Version 2.1 + + - editors that not in the editing panel shouldn't trigger switch breakpoint + - editors that not in the editing panel shouldn't show context menu + + Red Panda C++ Version 2.0 - redesign the project parser, more efficient and correct diff --git a/RedPandaIDE/RedPandaIDE.pro b/RedPandaIDE/RedPandaIDE.pro index 42ccf712..01fb946e 100644 --- a/RedPandaIDE/RedPandaIDE.pro +++ b/RedPandaIDE/RedPandaIDE.pro @@ -10,7 +10,7 @@ isEmpty(APP_NAME) { } isEmpty(APP_VERSION) { - APP_VERSION = 2.0 + APP_VERSION = 2.1 } macos: { diff --git a/RedPandaIDE/editor.cpp b/RedPandaIDE/editor.cpp index 07157618..793567f6 100644 --- a/RedPandaIDE/editor.cpp +++ b/RedPandaIDE/editor.cpp @@ -147,7 +147,9 @@ Editor::Editor(QWidget *parent, const QString& filename, //mLineAfterTabStop = ""; connect(this,&SynEdit::statusChanged,this,&Editor::onStatusChanged); - connect(this,&SynEdit::gutterClicked,this,&Editor::onGutterClicked); + + if (mParentPageControl) + connect(this,&SynEdit::gutterClicked,this,&Editor::onGutterClicked); onStatusChanged(QSynedit::StatusChange::scOpenFile); @@ -159,7 +161,9 @@ Editor::Editor(QWidget *parent, const QString& filename, this, &Editor::onLinesInserted); setContextMenuPolicy(Qt::CustomContextMenu); - connect(this, &QWidget::customContextMenuRequested, + + if (mParentPageControl) + connect(this, &QWidget::customContextMenuRequested, pMainWindow, &MainWindow::onEditorContextMenu); mCanAutoSave = false; @@ -171,19 +175,23 @@ Editor::Editor(QWidget *parent, const QString& filename, mCanAutoSave = true; } } - if (!isNew && parentPageControl!=nullptr) { + if (!isNew && parentPageControl) { resetBookmarks(); resetBreakpoints(); } + mStatementColors = pMainWindow->statementColors(); - if (mParentPageControl!=nullptr) { + if (mParentPageControl) { mParentPageControl->addTab(this,""); updateCaption(); } + if (mParentPageControl==nullptr) { setExtraKeystrokes(); } - connect(&mFunctionTipTimer, &QTimer::timeout, + + if (mParentPageControl) + connect(&mFunctionTipTimer, &QTimer::timeout, this, &Editor::onFunctionTipsTimer); connect(horizontalScrollBar(), &QScrollBar::valueChanged, diff --git a/Red_Panda_CPP.pro b/Red_Panda_CPP.pro index d00cfad8..8df55dc9 100644 --- a/Red_Panda_CPP.pro +++ b/Red_Panda_CPP.pro @@ -33,7 +33,7 @@ RedPandaIDE.depends += redpanda-git-askpass APP_NAME = RedPandaCPP -APP_VERSION = 2.0 +APP_VERSION = 2.1 linux: { isEmpty(PREFIX) {