mirror of
https://github.com/KDE/konsole.git
synced 2026-05-03 20:26:45 -04:00
Fix bug where multiple Konsole KParts within one application would not work. Part::activeSession() was always returning the first session from the shared SessionManager. In the second KPart, activeSession()->isRunning() would always return true even when the session for that part was not actually running, so the session was never started.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=754194
This commit is contained in:
@@ -458,7 +458,7 @@ SessionController* ViewManager::createController(Session* session , TerminalDisp
|
||||
// create a new controller for the session, and ensure that this view manager
|
||||
// is notified when the view gains the focus
|
||||
SessionController* controller = new SessionController(session,view,this);
|
||||
connect( controller , SIGNAL(focused(SessionController*)) , this , SIGNAL(activeViewChanged(SessionController*)) );
|
||||
connect( controller , SIGNAL(focused(SessionController*)) , this , SLOT(controllerChanged(SessionController*)) );
|
||||
connect( session , SIGNAL(destroyed()) , controller , SLOT(deleteLater()) );
|
||||
connect( view , SIGNAL(destroyed()) , controller , SLOT(deleteLater()) );
|
||||
connect( controller , SIGNAL(sendInputToAll(bool)) , this , SLOT(sendInputToAll()) );
|
||||
@@ -466,6 +466,17 @@ SessionController* ViewManager::createController(Session* session , TerminalDisp
|
||||
return controller;
|
||||
}
|
||||
|
||||
void ViewManager::controllerChanged(SessionController* controller)
|
||||
{
|
||||
_pluggedController = controller;
|
||||
emit activeViewChanged(controller);
|
||||
}
|
||||
|
||||
SessionController* ViewManager::activeViewController() const
|
||||
{
|
||||
return _pluggedController;
|
||||
}
|
||||
|
||||
void ViewManager::createView(Session* session)
|
||||
{
|
||||
// create the default container
|
||||
|
||||
Reference in New Issue
Block a user