Browse Source

Fixed SD2-451: Exception thrown when adding new event handler.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@495 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 20 years ago
parent
commit
1df303a5a0
  1. 7
      src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/FormDesignerViewContent.cs

7
src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/FormDesignerViewContent.cs

@ -156,7 +156,12 @@ namespace ICSharpCode.FormDesigner
{ {
generator.Detach(); generator.Detach();
p.Controls.Clear(); p.Controls.Clear();
designSurface.Dispose(); // We cannot dispose the design surface now because of SD2-451:
// When the switch to the source view was triggered by a double-click on an event
// in the PropertyPad, "InvalidOperationException: The container cannot be disposed
// at design time" is thrown.
// This is solved by calling dispose after the double-click event has been processed.
p.BeginInvoke(new MethodInvoker(designSurface.Dispose));
designSurface = null; designSurface = null;
} }

Loading…
Cancel
Save