Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLluis Sanchez <lluis@novell.com>2010-05-11 13:01:23 +0400
committerLluis Sanchez <lluis@novell.com>2010-05-11 13:01:23 +0400
commita95ebec0f2543c108eac7c259d71ce90d4557132 (patch)
tree5d7cf7cd4425262d2f34072eed0959973ece8745 /main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking
parent662d353d6ae27ae0033e3b7c642be5a8d4f4a9ae (diff)
* MonoDevelop.Components.Docking/DockGroup.cs: In RestoreAllocation,
make a copy of the items list because RestoreAllocation can fire events such as VisibleChanged, and subscribers may do changes in the list. Should fix bug #600869 - Exception while switching layout from 'Solution' to 'Default' using the tool bar. svn path=/trunk/monodevelop/; revision=157100
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockGroup.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockGroup.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockGroup.cs
index abc72d3b47..2dfc4ef7ca 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockGroup.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockGroup.cs
@@ -314,7 +314,11 @@ namespace MonoDevelop.Components.Docking
{
base.RestoreAllocation ();
allocStatus = Size >= 0 ? AllocStatus.RestorePending : AllocStatus.NotSet;
- foreach (DockObject ob in dockObjects)
+
+ // Make a copy because RestoreAllocation can fire events such as VisibleChanged,
+ // and subscribers may do changes in the list.
+ List<DockObject> copy = new List<DockObject> (dockObjects);
+ foreach (DockObject ob in copy)
ob.RestoreAllocation ();
}