Browse Source

fix SD-1554 - AvalonDock: windows placed on the second screen stay there even when unplugged (http://bugtracker.sharpdevelop.net/issue/ViewIssue.aspx?id=1554&PROJID=4)

4.1
Siegfried Pammer 14 years ago
parent
commit
9dc3902892
  1. 11
      src/Main/Base/Project/Src/Gui/Workbench/Layouts/AvalonDockLayout.cs

11
src/Main/Base/Project/Src/Gui/Workbench/Layouts/AvalonDockLayout.cs

@ -53,6 +53,16 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -53,6 +53,16 @@ namespace ICSharpCode.SharpDevelop.Gui
// so we have to load the configuration now
LoggingService.Info("dockingManager_Loaded");
LoadConfiguration();
EnsureFloatingWindowsLocations();
}
void EnsureFloatingWindowsLocations()
{
foreach (var window in dockingManager.FloatingWindows) {
var newLocation = FormLocationHelper.Validate(new Rect(window.Left, window.Top, window.Width, window.Height));
window.Left = newLocation.Left;
window.Top = newLocation.Top;
}
}
void dockingManager_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
@ -117,6 +127,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -117,6 +127,7 @@ namespace ICSharpCode.SharpDevelop.Gui
Busy = false;
}
LoadConfiguration();
EnsureFloatingWindowsLocations();
}
public void Detach()

Loading…
Cancel
Save