Skip to content

Commit

Permalink
Modify to switch to the tab when right-clicking on a non-current tab
Browse files Browse the repository at this point in the history
Signed-off-by: xiaoming <[email protected]>
  • Loading branch information
QQxiaoming committed Jun 5, 2024
1 parent 5e2c813 commit 6776db8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ en-US:
- Add block selection (Shift+click) and column selection (Alt+Shift+click) feature
- Fix the crash problem caused by modifying the configuration of the currently running session
- Fix the problem of incorrect pop-up position of the context menu in the case of multiple screens
- Modify to switch to the tab when right-clicking on a non-current tab

zh-CN:

Expand All @@ -17,6 +18,7 @@ zh-CN:
- 增加块选择(Shift+click)和列选择(Alt+Shift+click)功能
- 修复修改当前正在运行中的会话配置导致的崩溃问题
- 修复多屏幕的情况下,上下文菜单弹出位置错误问题
- 修改右击非当前标签页时,切换到该标签页

## [[V0.4.6](https://github.com/QQxiaoming/quardCRT/releases/tag/V0.4.6)] - 2024-05-26

Expand Down
1 change: 1 addition & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Add block selection (Shift+click) and column selection (Alt+Shift+click) feature
- Fix the crash problem caused by modifying the configuration of the currently running session
- Fix the problem of incorrect pop-up position of the context menu in the case of multiple screens
- Modify to switch to the tab when right-clicking on a non-current tab

## [[V0.4.6](https://github.com/QQxiaoming/quardCRT/releases/tag/V0.4.6)] - 2024-05-26

Expand Down
6 changes: 6 additions & 0 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ CentralWidget::CentralWidget(QString dir, StartupUIMode mode, QLocale lang, bool
if(index >= 0) {
if(mainWidgetGroup->sessionTab->currentIndex() != index) {
delete menu;
mainWidgetGroup->sessionTab->setCurrentIndex(index-1);
return;
}
QWidget *widget = mainWidgetGroup->sessionTab->currentWidget();
Expand Down Expand Up @@ -3774,6 +3775,11 @@ QString CentralWidget::startSSH2Session(MainWidgetGroup *group,
group->sessionTab->setCurrentIndex(group->sessionTab->count()-1);
return name;
#else
Q_UNUSED(group);
Q_UNUSED(hostname);
Q_UNUSED(port);
Q_UNUSED(username);
Q_UNUSED(password);
return name;
#endif
}
Expand Down

0 comments on commit 6776db8

Please sign in to comment.