From: Soeren Apel Date: Mon, 10 Oct 2016 10:00:35 +0000 (+0200) Subject: MainWindow: Select new session after creation X-Git-Tag: pulseview-0.4.0~231 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=085cd160a4a279997d5e406af30838c21d59ff95;p=pulseview.git MainWindow: Select new session after creation --- diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index 36f9b1a0..8d728a79 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -236,7 +236,9 @@ shared_ptr MainWindow::add_session() QMainWindow *window = new QMainWindow(); window->setWindowFlags(Qt::Widget); // Remove Qt::Window flag session_windows_[session] = window; - session_selector_.addTab(window, name); + + int index = session_selector_.addTab(window, name); + session_selector_.setCurrentIndex(index); window->setDockNestingEnabled(true);