aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-05-28 01:31:39 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-05-28 01:31:39 +0200
commit6acde5a8179b0b47c3bfa5b512c48fb7493b25da (patch)
tree270cbcaaf0afd1012de79af902ed9da0aa974d1c /src/mainwindow
parentFocus view when changing tabs (diff)
downloadsmolbote-6acde5a8179b0b47c3bfa5b512c48fb7493b25da.tar.xz
Swap to new tab after creating it
Diffstat (limited to 'src/mainwindow')
-rw-r--r--src/mainwindow/window.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mainwindow/window.cpp b/src/mainwindow/window.cpp
index 0c28663..a5ab90b 100644
--- a/src/mainwindow/window.cpp
+++ b/src/mainwindow/window.cpp
@@ -51,7 +51,8 @@ Window::Window(const QHash<QString, QString> &config, QWidget *parent, Qt::Windo
newTab_button->setToolTip(tr("Add tab"));
newTab_button->setShortcut(QKeySequence(config.value("window.shortcuts.new")));
connect(newTab_button, &QToolButton::clicked, this, [=]() {
- addTab(WebProfile::defaultProfile()->newtab());
+ auto index = addTab(WebProfile::defaultProfile()->newtab());
+ tabWidget->setCurrentIndex(index);
});
tabWidget->setCornerWidget(newTab_button, Qt::TopRightCorner);