From f5e1128517b09d14a5d0201a4ded3e7d47c2a4e0 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Fri, 1 Mar 2024 13:34:26 +1000 Subject: [PATCH 1/2] Fix renaming secondary map canvases Fixes #56602 --- src/app/qgisapp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index 08b6de56674b..97699a3dec87 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -15991,7 +15991,7 @@ void QgisApp::renameView() if ( renameDlg.exec() || renameDlg.name().isEmpty() ) { QString newName = renameDlg.name(); - view->setWindowTitle( newName ); + view->dockableWidgetHelper()->setWindowTitle( newName ); view->mapCanvas()->setObjectName( newName ); } } From 03c99bd79d29158d9cd4aea24e2e6a382635582a Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Fri, 1 Mar 2024 13:39:17 +1000 Subject: [PATCH 2/2] Fix window focus after renaming views --- src/app/qgisapp.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index 97699a3dec87..7215bbd30bc5 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -15994,6 +15994,8 @@ void QgisApp::renameView() view->dockableWidgetHelper()->setWindowTitle( newName ); view->mapCanvas()->setObjectName( newName ); } + view->raise(); + view->activateWindow(); } QgsRasterLayer *QgisApp::addRasterLayer( QString const &uri, QString const &baseName, QString const &providerKey )