[Monodevelop-patches-list] r2389 - trunk/MonoDevelop/Core/src/MonoDevelop.Dock
John Luke <jluke@cfl.rr.com>
jluke at mono-cvs.ximian.com
Thu Mar 24 17:49:04 EST 2005
Author: jluke
Date: 2005-03-24 17:49:03 -0500 (Thu, 24 Mar 2005)
New Revision: 2389
Modified:
trunk/MonoDevelop/Core/src/MonoDevelop.Dock/ChangeLog
trunk/MonoDevelop/Core/src/MonoDevelop.Dock/DockLayout.cs
Log:
hopefully fix lockup while creating workbench
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Dock/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Dock/ChangeLog 2005-03-24 21:58:02 UTC (rev 2388)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Dock/ChangeLog 2005-03-24 22:49:03 UTC (rev 2389)
@@ -1,3 +1,8 @@
+2005-03-24 John Luke <john.luke at gmail.com>
+
+ * DockLayout.cs (UpdateItemsModel): reduce chances of being stuck
+ endlessly in the loop, thanks to toshok for pointing me to it
+
2005-03-17 John Luke <john.luke at gmail.com>
* Dock.cs:
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Dock/DockLayout.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Dock/DockLayout.cs 2005-03-24 21:58:02 UTC (rev 2388)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Dock/DockLayout.cs 2005-03-24 22:49:03 UTC (rev 2389)
@@ -298,16 +298,18 @@
DockItem item = itemsModel.GetValue (iter, 3) as DockItem;
if (item != null) {
// look for the object in the items list
- foreach (DockItem di in items)
+ for (int i = 0; i < items.Count; i ++)
{
// found, update data
- if (item == di) {
+ if (item == items[i]) {
UpdateItemData (iter, item);
- items.Remove (di);
+ items.RemoveAt (i);
valid = itemsModel.IterNext (ref iter);
goto walk_start;
}
}
+ // FIXME: not found, skip it?
+ valid = itemsModel.IterNext (ref iter);
}
else {
// not a valid row
More information about the Monodevelop-patches-list
mailing list