diff options
author | Lluis Sanchez <lluis@xamarin.com> | 2016-07-13 16:39:30 +0300 |
---|---|---|
committer | Lluis Sanchez <lluis@xamarin.com> | 2016-07-13 16:39:30 +0300 |
commit | d04e8a42146c183fae438a196bd7213517ce9de7 (patch) | |
tree | e3a86c18e2817d67075523e8f34fdce9c8605f23 /main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking | |
parent | 2b0cf79be1c546ec18129188aecde7e3bcd3821d (diff) | |
parent | 7446a7c8606c95180d7f2c89461ee3d3d44ec05d (diff) |
Merge remote-tracking branch 'origin/run-configurations'
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockContainer.cs | 9 | ||||
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockItem.cs | 9 |
2 files changed, 14 insertions, 4 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockContainer.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockContainer.cs index a606782e93..49d42c8fd7 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockContainer.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockContainer.cs @@ -84,8 +84,11 @@ namespace MonoDevelop.Components.Docking layout = null; } + internal bool IsSwitchingLayout { get; set; } + public void LoadLayout (DockLayout dl) { + IsSwitchingLayout = true; HidePlaceholder (); // Sticky items currently selected in notebooks will remain @@ -97,8 +100,8 @@ namespace MonoDevelop.Components.Docking if (gitem != null && gitem.ParentGroup.IsSelectedPage (it)) sickyOnTop.Add (it); } - } - + } + if (layout != null) layout.StoreAllocation (); layout = dl; @@ -116,6 +119,8 @@ namespace MonoDevelop.Components.Docking foreach (DockItem it in sickyOnTop) it.Present (false); + + IsSwitchingLayout = false; } public void StoreAllocation () diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockItem.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockItem.cs index ceec861e19..362e168cd6 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockItem.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockItem.cs @@ -68,7 +68,7 @@ namespace MonoDevelop.Components.Docking DockVisualStyle itemStyle; DockVisualStyle currentVisualStyle; - public event EventHandler VisibleChanged; + public event EventHandler<VisibilityChangeEventArgs> VisibleChanged; public event EventHandler ContentVisibleChanged; public event EventHandler ContentRequired; @@ -365,7 +365,7 @@ namespace MonoDevelop.Components.Docking if (vis != lastVisibleStatus) { lastVisibleStatus = vis; if (VisibleChanged != null) - VisibleChanged (this, EventArgs.Empty); + VisibleChanged (this, new VisibilityChangeEventArgs { SwitchingLayout = frame.Container.IsSwitchingLayout}); } UpdateContentVisibleStatus (); } @@ -587,4 +587,9 @@ namespace MonoDevelop.Components.Docking public Gtk.Window DockParent { get; private set; } } + + public class VisibilityChangeEventArgs: EventArgs + { + public bool SwitchingLayout { get; set; } + } } |