Browse Source

Fixed bug: Starting IDE Multiple Times looses Panel layout (based on patch by Scott Ferrett)

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.0@1424 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 20 years ago
parent
commit
f9cfdec1d3
  1. 2
      src/Main/Base/Project/Src/Gui/Pads/DefinitionViewPad.cs
  2. 22
      src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs

2
src/Main/Base/Project/Src/Gui/Pads/DefinitionViewPad.cs

@ -63,7 +63,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -63,7 +63,7 @@ namespace ICSharpCode.SharpDevelop.Gui
if (res == null) return;
FilePosition pos = res.GetDefinitionPosition();
if (pos == null) return;
ctl.Invoke(new OpenFileDelegate(OpenFile), pos);
WorkbenchSingleton.SafeThreadAsyncCall(new OpenFileDelegate(OpenFile), pos);
}
ResolveResult ResolveAtCaret(ParserUpdateStepEventArgs e)

22
src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs

@ -127,14 +127,14 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -127,14 +127,14 @@ namespace ICSharpCode.SharpDevelop.Gui
case "HideToolbars":
RedrawToolbars();
break;
//case "HideTabs":
//case "HideVerticalScrollbar":
//case "HideHorizontalScrollbar":
//case "HideTabs":
//case "HideVerticalScrollbar":
//case "HideHorizontalScrollbar":
case "HideStatusBar":
case "ShowStatusBarOnMouseMove":
RedrawStatusBar();
break;
//case "HideWindowsTaskbar":
//case "HideWindowsTaskbar":
}
}
}
@ -163,7 +163,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -163,7 +163,7 @@ namespace ICSharpCode.SharpDevelop.Gui
{
try {
if (File.Exists(LayoutConfiguration.CurrentLayoutFileName)) {
dockPanel.LoadFromXml(LayoutConfiguration.CurrentLayoutFileName, new DeserializeDockContent(GetContent));
LoadDockPanelLayout(LayoutConfiguration.CurrentLayoutFileName);
} else {
LoadDefaultLayoutConfiguration();
}
@ -175,7 +175,17 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -175,7 +175,17 @@ namespace ICSharpCode.SharpDevelop.Gui
void LoadDefaultLayoutConfiguration()
{
if (File.Exists(LayoutConfiguration.CurrentLayoutTemplateFileName)) {
dockPanel.LoadFromXml(LayoutConfiguration.CurrentLayoutTemplateFileName, new DeserializeDockContent(GetContent));
LoadDockPanelLayout(LayoutConfiguration.CurrentLayoutTemplateFileName);
}
}
void LoadDockPanelLayout(string fileName)
{
// LoadFromXml(fileName, ...) locks the file against simultanous read access
// -> we would loose the layout when starting two SharpDevelop instances
// at the same time => open stream with shared read access.
using (FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read)) {
dockPanel.LoadFromXml(fs, new DeserializeDockContent(GetContent));
}
}

Loading…
Cancel
Save