comparison mde/gui/widget/layout.d @ 133:9fd705793568

Fixed menu popup bug, improved recursion detection. Menu popups can now determine whether or not they are sub-menus. Recursion detection can now also check content (if not the same, there's not a risk of infinite recursion).
author Diggory Hardy <diggory.hardy@gmail.com>
date Fri, 23 Jan 2009 16:05:05 +0000
parents 9cff74f68b84
children 4084f07f2c7a
comparison
equal deleted inserted replaced
132:264028f4115a 133:9fd705793568
112 } else { 112 } else {
113 rows = cols = 1; 113 rows = cols = 1;
114 subWidgets = [mgr.makeWidget (this, data.strings[0], 114 subWidgets = [mgr.makeWidget (this, data.strings[0],
115 new ErrorContent ("<empty list>",null)) ]; 115 new ErrorContent ("<empty list>",null)) ];
116 } 116 }
117 }
118
119 override void recursionCheck (widgetID wID, IContent c) {
120 if (wID is id && c is cList)
121 throw new WidgetRecursionException (wID);
122 parent.recursionCheck (wID, c);
117 } 123 }
118 124
119 override bool saveChanges () { 125 override bool saveChanges () {
120 // Since all sub-widgets have the same id, it only makes sense to call on one 126 // Since all sub-widgets have the same id, it only makes sense to call on one
121 if (subWidgets is null) 127 if (subWidgets is null)