------------------------------------------------------------
revno: 2417
committer: Jacek Sieka <[email protected]>
branch nick: dcplusplus
timestamp: Tue 2011-02-08 23:19:11 +0100
message:
  grid sanity check
modified:
  dwt/src/widgets/Grid.cpp


--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk

Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'dwt/src/widgets/Grid.cpp'
--- dwt/src/widgets/Grid.cpp	2011-02-01 20:32:13 +0000
+++ dwt/src/widgets/Grid.cpp	2011-02-08 22:19:11 +0000
@@ -30,6 +30,7 @@
 */
 
 #include <dwt/widgets/Grid.h>
+#include <dwt/util/check.h>
 
 #include <algorithm>
 #include <numeric>
@@ -262,6 +263,8 @@
 }
 
 void Grid::setWidget(Widget* w, size_t row, size_t column, size_t rowSpan, size_t colSpan) {
+	dwtassert(w->getParent() == this, _T("Widget must be a child of the grid"));
+
 	for(WidgetInfoList::iterator i = widgetInfo.begin(), iend = widgetInfo.end(); i != iend; ++i) {
 		if(i->w == w) {
 			i->row = row;

_______________________________________________
Mailing list: https://launchpad.net/~linuxdcpp-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~linuxdcpp-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to