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

List:       kde-commits
Subject:    [Calligra/all-tooldocker-boemann] b858418: Don't loose docker
From:       Casper Boemann <cbo () boemann ! dk>
Date:       2010-12-31 20:00:27
Message-ID: 20101231200027.61B87A6092 () git ! kde ! org
[Download RAW message or body]

commit b8584187e3032b8faa3e840cb51b3a3cf85ea3cc
branch all-tooldocker-boemann
Author: Casper Boemann <cbo@boemann.dk>
Date:   Fri Dec 31 20:18:29 2010 +0100

    Don't loose docker visibillity when closing application while startUpWidget
    is shown.

diff --git a/libs/main/KoDocument.h b/libs/main/KoDocument.h
index fe1f549..47c7f3e 100644
--- a/libs/main/KoDocument.h
+++ b/libs/main/KoDocument.h
@@ -414,6 +414,11 @@ public:
     virtual void showStartUpWidget(KoMainWindow *parent, bool alwaysShow = false);
 
     /**
+     * Removes the startupWidget shown at application start up.
+     */
+    void deleteOpenPane();
+
+    /**
      *  Tells the document that its title has been modified, either because
      *  the modified status changes (this is done by setModified() ) or
      *  because the URL or the document-info's title changed.
@@ -1009,11 +1014,6 @@ private slots:
     void slotStarted(KIO::Job*);
     void startCustomDocument();
 
-    /**
-     * Removes the open widget shown at application start up.
-     */
-    void deleteOpenPane();
-
 private:
 
     bool saveNativeFormatODF(KoStore *store, const QByteArray &mimeType);
diff --git a/libs/main/KoMainWindow.cpp b/libs/main/KoMainWindow.cpp
index 78604bd..61f3359 100644
--- a/libs/main/KoMainWindow.cpp
+++ b/libs/main/KoMainWindow.cpp
@@ -1049,6 +1049,10 @@ bool KoMainWindow::saveDocument(bool saveas, bool silent)
 void KoMainWindow::closeEvent(QCloseEvent *e)
 {
     if (queryClose()) {
+        if (d->docToOpen) {
+            // The open pane is visible
+            d->docToOpen->deleteOpenPane();
+        }
         // Reshow the docker that were temporarely hidden before saving settings
         foreach(QDockWidget* dw, d->hiddenDockwidgets) {
             dw->show();
[prev in list] [next in list] [prev in thread] [next in thread] 

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