Browse Source

Fixed SD2-1107: InvalidEnumArgumentException when making form localizable and text alignment set to TopRight.

Do not create a new instance of DesignerResourceService on every designer load because this service caches the resource contents. Otherwise any changes to the resources are discarded when the user switches between source and design view more than once without saving.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1933 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Christian Hornung 20 years ago
parent
commit
1fabc19dbd
  1. 7
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerViewContent.cs

7
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerViewContent.cs

@ -111,7 +111,14 @@ namespace ICSharpCode.FormsDesigner @@ -111,7 +111,14 @@ namespace ICSharpCode.FormsDesigner
serviceContainer.AddService(typeof(IHelpService), new HelpService());
serviceContainer.AddService(typeof(System.Drawing.Design.IPropertyValueUIService), new PropertyValueUIService());
// Do not re-initialize the resource service on every load
// because of SD2-1107.
// The service holds cached resource file contents which
// may not have been written to disk yet if the user switched
// between source and design view without saving.
if (designerResourceService == null) {
designerResourceService = new DesignerResourceService(viewContent.FileName);
}
serviceContainer.AddService(typeof(System.ComponentModel.Design.IResourceService), designerResourceService);
AmbientProperties ambientProperties = new AmbientProperties();
serviceContainer.AddService(typeof(AmbientProperties), ambientProperties);

Loading…
Cancel
Save