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

List:       kde-commits
Subject:    KDE/kdevplatform/sublime
From:       Alexander Dymo <adymo () kdevelop ! org>
Date:       2009-11-28 1:19:00
Message-ID: 1259371140.883634.19408.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1055430 by dymo:

Do not leave empty toplevel widgets after closing all open files with "Close All":
- it was the left corner workingset indicator widget which was reparented to 0 and stayed visible
- the current fix is to hide it before reparenting and show right after adding to the corner
- this fix is of course bad, but it's not worse than the code which manages this widget
  (in general, workingsets do not properly integrate into the UI)

BUG:198251


 M  +1 -0      container.cpp  
 M  +9 -3      mainwindow_p.cpp  


--- trunk/KDE/kdevplatform/sublime/container.cpp #1055429:1055430
@@ -179,6 +179,7 @@
         return;
     widget->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
     m_tabBarLayout->insertWidget(0, widget);
+    widget->show();
 }
 
 Container::~Container()
--- trunk/KDE/kdevplatform/sublime/mainwindow_p.cpp #1055429:1055430
@@ -257,8 +257,10 @@
 
 void MainWindowPrivate::reconstruct()
 {
-    if(m_leftTabbarCornerWidget)
+    if(m_leftTabbarCornerWidget) {
+        m_leftTabbarCornerWidget->hide();
         m_leftTabbarCornerWidget->setParent(0);
+    }
     
     IdealToolViewCreator toolViewCreator(this);
     area->walkToolViews(toolViewCreator, Sublime::AllPositions);
@@ -364,8 +366,10 @@
 
 void MainWindowPrivate::viewAdded(Sublime::AreaIndex *index, Sublime::View *view)
 {
-    if(m_leftTabbarCornerWidget)
+    if(m_leftTabbarCornerWidget) {
+        m_leftTabbarCornerWidget->hide();
         m_leftTabbarCornerWidget->setParent(0);
+    }
     
     ViewCreator viewCreator(this);
     QSplitter *splitter = m_indexSplitters[index];
@@ -429,8 +433,10 @@
     }
     else
     {
-        if(m_leftTabbarCornerWidget)
+        if(m_leftTabbarCornerWidget) {
+            m_leftTabbarCornerWidget->hide();
             m_leftTabbarCornerWidget->setParent(0);
+        }
         
         // We've about to remove the last view of this container.  It will
         // be empty, so have to delete it, as well.
[prev in list] [next in list] [prev in thread] [next in thread] 

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