ui: Create new tab on tabbar doubleclick (#803)

This commit is contained in:
palinek
2017-10-24 23:19:13 +02:00
committed by Oleg Shparber
parent 4769b7a228
commit df2b74b6d4
+4
View File
@@ -402,6 +402,10 @@ MainWindow::MainWindow(Core::Application *app, QWidget *parent) :
ui->actionNewTab->setShortcut(QKeySequence::AddTab);
connect(ui->actionNewTab, &QAction::triggered, this, [this]() { createTab(); });
addAction(ui->actionNewTab);
connect(m_tabBar, &QTabBar::tabBarDoubleClicked, this, [this](int index) {
if (index == -1)
createTab();
});
// Save expanded items
connect(ui->treeView, &QTreeView::expanded, [this](QModelIndex index) {