diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index 7067d8dd..aabf7535 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -1112,6 +1112,12 @@ void MainWindow::buildContextMenus() ui->watchView->setContextMenuPolicy(Qt::CustomContextMenu); connect(ui->watchView,&QWidget::customContextMenuRequested, this, &MainWindow::onWatchViewContextMenu); + ui->EditorTabsLeft->setContextMenuPolicy(Qt::CustomContextMenu); + connect(ui->EditorTabsLeft,&QWidget::customContextMenuRequested, + this, &MainWindow::onEditorTabContextMenu); + ui->EditorTabsRight->setContextMenuPolicy(Qt::CustomContextMenu); + connect(ui->EditorTabsRight,&QWidget::customContextMenuRequested, + this, &MainWindow::onEditorTabContextMenu); } @@ -1248,6 +1254,11 @@ void MainWindow::onEditorContextMenu(const QPoint &pos) } +void MainWindow::onEditorTabContextMenu(const QPoint &pos) +{ + +} + void MainWindow::onFileChanged(const QString &path) { Editor *e = mEditorList->getOpenedEditorByFilename(path); diff --git a/RedPandaIDE/mainwindow.h b/RedPandaIDE/mainwindow.h index 665a4df0..59b8d878 100644 --- a/RedPandaIDE/mainwindow.h +++ b/RedPandaIDE/mainwindow.h @@ -119,6 +119,7 @@ public slots: void onEndParsing(int total, int updateView); void onEvalValueReady(const QString& value); void onEditorContextMenu(const QPoint& pos); + void onEditorTabContextMenu(const QPoint& pos); private: void openFiles(const QStringList& files);