diff gui/src/FilesDockWidget.cpp @ 13577:e440b3f32f02

Fixed bug with closing subwindows.
author Jacob Dawid <jacob.dawid@googlemail.com>
date Mon, 01 Aug 2011 18:51:36 +0200
parents 807e5e9b7591
children ee49f1a15c06
line wrap: on
line diff
--- a/gui/src/FilesDockWidget.cpp
+++ b/gui/src/FilesDockWidget.cpp
@@ -97,6 +97,8 @@
   QCompleter *
     completer = new QCompleter (m_fileSystemModel, this);
   m_currentDirectory->setCompleter (completer);
+
+  connect (this, SIGNAL (visibilityChanged(bool)), this, SLOT(handleVisibilityChanged(bool)));
 }
 
 void
@@ -180,3 +182,17 @@
   //if (settings.value ("showHiddenFiles").toBool ())
   // TODO: React on option for hidden files.
 }
+
+void
+FilesDockWidget::handleVisibilityChanged (bool visible)
+{
+  if (visible)
+    emit activeChanged (true);
+}
+
+void
+FilesDockWidget::closeEvent (QCloseEvent *event)
+{
+  emit activeChanged (false);
+  QDockWidget::closeEvent (event);
+}