aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow/window.cpp')
-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);