diff options
author | Lluis Sanchez <llsan@microsoft.com> | 2017-05-04 15:05:54 +0300 |
---|---|---|
committer | Lluis Sanchez <llsan@microsoft.com> | 2017-05-04 17:15:26 +0300 |
commit | deb1d8c58877ab1dd91414ae450823008e29d175 (patch) | |
tree | 81255479543d97de249f6ff92c434f1cf7d380ab /main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook | |
parent | a70000fb370175f1f2888c835d76cedaff4c49d4 (diff) |
Fix bug when restoring document splits
Fixes bug #55399 - Editor columns become stacked hiding
one one column behind the other when VS is closed and reopen.
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook/DockNotebookContainer.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook/DockNotebookContainer.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook/DockNotebookContainer.cs index f9fb7fa24b..c20b2d570b 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook/DockNotebookContainer.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook/DockNotebookContainer.cs @@ -89,7 +89,16 @@ namespace MonoDevelop.Components.DockNotebook protected override void OnSizeAllocated (Gdk.Rectangle allocation) { base.OnSizeAllocated (allocation); - if (!splitsInitialized) { + + // When showing the dock frame for the first time, the dock container is assigned a size of 1x1 before + // it gets the real size. This causes the splits to be initialized with position set to 0, which + // means the first widget of the split is not visible. To avoid this problem, we now initialize + // the splits only when the size is > 1. + // This didn't happen before, and it is not clear why is it happening now. + // Maybe the accessibility changes are causing the dock container to be realized earlier, or maybe + // it is due to some change in gtk. + + if (!splitsInitialized && allocation.Width > 1 && allocation.Height > 1) { splitsInitialized = true; if (Child is HPaned) { var p = (HPaned)Child; |