From 3cb15390cef38a29e3befd517b6fd20ca228c2bc Mon Sep 17 00:00:00 2001 From: Soeren Apel Date: Fri, 4 Nov 2016 18:21:37 +0100 Subject: [PATCH] MainWindow: Update tab text when session name changes --- pv/mainwindow.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index e213f511..1738f9b1 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -578,6 +578,14 @@ void MainWindow::on_session_name_changed() } } + // Update the tab widget by finding the main window and the tab from that + for (auto entry : session_windows_) + if (entry.first.get() == session) { + QMainWindow *window = entry.second; + const int index = session_selector_.indexOf(window); + session_selector_.setTabText(index, session->name()); + } + // Refresh window title if the affected session has focus if (session == last_focused_session_.get()) setWindowTitle(session->name() + " - " + WindowTitle); -- 2.30.2