[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdevelop/lib/shell
From:       Alexander Dymo <adymo () kdevelop ! org>
Date:       2007-02-11 17:26:46
Message-ID: 1171214806.935846.14563.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 632574 by dymo:

Use our own part activation slot so that gui will not be merged in the correct \
mainwindow if there're many of them.


 M  +4 -5      mainwindow.cpp  


--- trunk/KDE/kdevelop/lib/shell/mainwindow.cpp #632573:632574
@@ -84,9 +84,6 @@
 MainWindow::MainWindow( Sublime::Controller *parent, Qt::WFlags flags )
         : Sublime::MainWindow( parent, flags )
 {
-    ///@todo adymo: figure out why this doesn't work
-//     Core::self()->partController()->addManagedTopLevelWidget(this);
-
     setObjectName( QLatin1String( "MainWindow" ) );
     d = new MainWindowPrivate();
     d->center = new QStackedWidget( this );
@@ -259,8 +256,9 @@
 void MainWindow::initialize()
 {
     createGUI(0);
+    Core::self()->partController()->addManagedTopLevelWidget(this);
     connect( Core::self()->partController(), \
                SIGNAL(activePartChanged(KParts::Part*)),
-        this, SLOT(createGUI(KParts::Part*)));
+        this, SLOT(activePartChanged(KParts::Part*)));
 /*    connect( Core::documentController(), SIGNAL( documentActivated( Document* ) ),
              this, SLOT( documentActivated( Document* ) ) );
     connect( Core::projectController(), SIGNAL( projectOpened() ),
@@ -472,7 +470,8 @@
 
 void KDevelop::MainWindow::activePartChanged(KParts::Part *part)
 {
-    createGUI(part);
+    if ( Core::self()->uiControllerInternal()->activeMainWindow() == this)
+        createGUI(part);
 }
 
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic