[rkward-cvs] SF.net SVN: rkward:[3546] trunk/rkward/rkward/windows

tfry at users.sourceforge.net tfry at users.sourceforge.net
Wed May 11 17:50:34 UTC 2011


Revision: 3546
          http://rkward.svn.sourceforge.net/rkward/?rev=3546&view=rev
Author:   tfry
Date:     2011-05-11 17:50:33 +0000 (Wed, 11 May 2011)

Log Message:
-----------
Silence false asserts

Modified Paths:
--------------
    trunk/rkward/rkward/windows/rktoolwindowbar.cpp
    trunk/rkward/rkward/windows/rkworkplace.cpp

Modified: trunk/rkward/rkward/windows/rktoolwindowbar.cpp
===================================================================
--- trunk/rkward/rkward/windows/rktoolwindowbar.cpp	2011-05-11 05:33:31 UTC (rev 3545)
+++ trunk/rkward/rkward/windows/rktoolwindowbar.cpp	2011-05-11 17:50:33 UTC (rev 3546)
@@ -126,12 +126,13 @@
 void RKToolWindowBar::addWidget (RKMDIWindow *window) {
 	RK_TRACE (APP);
 	RK_ASSERT (window);
+	if (window->tool_window_bar == this) return;	// may happen while restoring windows
 	RK_ASSERT (container);
+
 	static int id_count = 0;
 	int id = ++id_count;
 
 	if (window->tool_window_bar) {
-		RK_ASSERT (window->tool_window_bar != this);	// no problem, but would be useless code
 		window->tool_window_bar->removeWidget (window);
 	}
 

Modified: trunk/rkward/rkward/windows/rkworkplace.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkworkplace.cpp	2011-05-11 05:33:31 UTC (rev 3545)
+++ trunk/rkward/rkward/windows/rkworkplace.cpp	2011-05-11 17:50:33 UTC (rev 3546)
@@ -649,8 +649,6 @@
 					win->hide ();
 					win->setGeometry (geom.value (1).toInt (), geom.value (2).toInt (), geom.value (3).toInt (), geom.value (4).toInt ());
 					detachWindow (win);
-				} else {
-					RK_ASSERT (false);
 				}
 			}
 		}


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