]> sigrok.org Git - pulseview.git/commitdiff
MainWindow: Select new session after creation
authorSoeren Apel <redacted>
Mon, 10 Oct 2016 10:00:35 +0000 (12:00 +0200)
committerSoeren Apel <redacted>
Sun, 4 Dec 2016 13:37:37 +0000 (14:37 +0100)
pv/mainwindow.cpp

index 36f9b1a086f9861358f3de8028a4e37ff6e654d5..8d728a797c86ff0b4e95b66b2f3337a917887ad7 100644 (file)
@@ -236,7 +236,9 @@ shared_ptr<Session> 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);