From kde-commits Mon Dec 31 23:17:37 2007 From: Robert Knight Date: Mon, 31 Dec 2007 23:17:37 +0000 To: kde-commits Subject: KDE/kdebase/apps/konsole/src Message-Id: <1199143057.837077.31646.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=119914306523715 SVN commit 755284 by knight: Fix bug where KPart did not emit setWindowCaption() signal until it gained focus. Call controllerChanged() in ViewManager::createController() so that an activeViewChanged() signal is emitted when the first controller in the view manager is created. Fix ViewManager::controllerChanged() to only emit an activeViewChanged() signal if the new and previous controllers are different. Remove the checks for this from the MainWindow and Part slots connected to this signal. M +0 -3 MainWindow.cpp M +0 -3 Part.cpp M +4 -1 ViewManager.cpp --- trunk/KDE/kdebase/apps/konsole/src/MainWindow.cpp #755283:755284 @@ -131,9 +131,6 @@ void MainWindow::activeViewChanged(SessionController* controller) { - if ( _pluggedController == controller ) - return; - // associate bookmark menu with current session bookmarkHandler()->setActiveView(controller); disconnect( bookmarkHandler() , SIGNAL(openUrl(const KUrl&)) , 0 , 0 ); --- trunk/KDE/kdebase/apps/konsole/src/Part.cpp #755283:755284 @@ -181,9 +181,6 @@ widget()->setFocusProxy( _viewManager->activeView() ); - if ( controller == _pluggedController ) - return; - // remove existing controller if (_pluggedController) { --- trunk/KDE/kdebase/apps/konsole/src/ViewManager.cpp #755283:755284 @@ -465,13 +465,16 @@ // if this is the first controller created then set it as the active controller if (!_pluggedController) - _pluggedController = controller; + controllerChanged(controller); return controller; } void ViewManager::controllerChanged(SessionController* controller) { + if ( controller == _pluggedController ) + return; + _pluggedController = controller; emit activeViewChanged(controller); }