[rkward-cvs] SF.net SVN: rkward:[2452] trunk/rkward
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Fri May 1 11:44:27 UTC 2009
Revision: 2452
http://rkward.svn.sourceforge.net/rkward/?rev=2452&view=rev
Author: tfry
Date: 2009-05-01 11:44:27 +0000 (Fri, 01 May 2009)
Log Message:
-----------
Make sure to always destroy the container when re-attaching detached windows
Modified Paths:
--------------
trunk/rkward/ChangeLog
trunk/rkward/rkward/windows/detachedwindowcontainer.cpp
trunk/rkward/rkward/windows/rkworkplace.cpp
Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog 2009-04-30 14:53:55 UTC (rev 2451)
+++ trunk/rkward/ChangeLog 2009-05-01 11:44:27 UTC (rev 2452)
@@ -1,4 +1,5 @@
--- Version 0.5.0d - ??????????
+- Fixed: Container of detached windows would sometimes remain after reattaching
- Fixed: Global toolbar style was not honored
- Fixed: Auto-scroll missing in progress dialogs and data editor
- Fix jumping toolbar
Modified: trunk/rkward/rkward/windows/detachedwindowcontainer.cpp
===================================================================
--- trunk/rkward/rkward/windows/detachedwindowcontainer.cpp 2009-04-30 14:53:55 UTC (rev 2451)
+++ trunk/rkward/rkward/windows/detachedwindowcontainer.cpp 2009-05-01 11:44:27 UTC (rev 2452)
@@ -111,15 +111,7 @@
void DetachedWindowContainer::slotReattach () {
RK_TRACE (APP);
-// we will not handle any more signals from the window
- disconnect (captured, SIGNAL (destroyed (QObject *)), this, SLOT (viewDestroyed (QObject *)));
- disconnect (captured, SIGNAL (captionChanged (RKMDIWindow *)), this, SLOT (updateCaption (RKMDIWindow *)));
-
- captured->setParent (0);
RKWorkplace::mainWorkplace ()->attachWindow (captured);
-
- hide ();
- deleteLater ();
}
void DetachedWindowContainer::closeEvent (QCloseEvent *e) {
Modified: trunk/rkward/rkward/windows/rkworkplace.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkworkplace.cpp 2009-04-30 14:53:55 UTC (rev 2451)
+++ trunk/rkward/rkward/windows/rkworkplace.cpp 2009-05-01 11:44:27 UTC (rev 2452)
@@ -2,7 +2,7 @@
rkworkplace - description
-------------------
begin : Thu Sep 21 2006
- copyright : (C) 2006, 2007 by Thomas Friedrichsmeier
+ copyright : (C) 2006, 2007, 2009 by Thomas Friedrichsmeier
email : tfry at users.sourceforge.net
***************************************************************************/
@@ -129,7 +129,13 @@
RK_TRACE (APP);
RK_ASSERT (windows.contains (window)); // This should not happen for now.
- if (!window->isAttached ()) window->prepareToBeAttached ();
+ if (!window->isAttached ()) {
+ QWidget *old_parent = window->parentWidget ();
+ window->prepareToBeAttached ();
+ if (old_parent && qobject_cast<DetachedWindowContainer*> (old_parent)) {
+ old_parent->deleteLater ();
+ }
+ }
// all the rest is done, even if the window was previously "Attached", as this may also mean it was freshly created
window->state = RKMDIWindow::Attached;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list