- enhancement: "Switch Header/Source" in editor title bar context menu.
This commit is contained in:
parent
0caaad8436
commit
96f9a898d0
1
NEWS.md
1
NEWS.md
|
@ -7,6 +7,7 @@ Red Panda C++ Version 2.8
|
|||
- fix: Can't set project icon to "app.ico" in the project folder, if the project doesn't has icon.
|
||||
- fix: Resource compilation items is missing in the auto generated makefile, if the project's icon is removed and re-added.
|
||||
- fix: Action "Run all problem cases" is triggered twice by one clicked.
|
||||
- enhancement: "Switch Header/Source" in editor title bar context menu.
|
||||
|
||||
Red Panda C++ Version 2.7
|
||||
|
||||
|
|
|
@ -4812,6 +4812,11 @@ void MainWindow::onEditorTabContextMenu(QTabWidget* tabWidget, const QPoint &pos
|
|||
tabWidget->setCurrentIndex(index);
|
||||
QMenu menu(this);
|
||||
QTabBar* tabBar = tabWidget->tabBar();
|
||||
Editor * editor = dynamic_cast<Editor *>(tabWidget->widget(index));
|
||||
if (!switchHeaderSourceTarget(editor).isEmpty()) {
|
||||
menu.addAction(ui->actionSwitchHeaderSource);
|
||||
menu.addSeparator();
|
||||
}
|
||||
menu.addAction(ui->actionClose);
|
||||
menu.addAction(ui->actionClose_All);
|
||||
menu.addSeparator();
|
||||
|
@ -4826,7 +4831,6 @@ void MainWindow::onEditorTabContextMenu(QTabWidget* tabWidget, const QPoint &pos
|
|||
tabWidget==ui->EditorTabsRight
|
||||
|| tabWidget->count()>1
|
||||
);
|
||||
Editor * editor = dynamic_cast<Editor *>(tabWidget->widget(index));
|
||||
if (editor ) {
|
||||
ui->actionLocate_in_Files_View->setEnabled(!editor->isNew());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue