From 4f45ea8932e7f2680933a900f99268b0d6c8d0cf Mon Sep 17 00:00:00 2001
From: Paul McCarthy <pauld.mccarthy@gmail.com>
Date: Tue, 21 Jul 2015 16:16:05 +0100
Subject: [PATCH] Fix ViewPanel putting panels on the same layer as toolbars

---
 fsl/fslview/views/viewpanel.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fsl/fslview/views/viewpanel.py b/fsl/fslview/views/viewpanel.py
index 588601495..cd44d8392 100644
--- a/fsl/fslview/views/viewpanel.py
+++ b/fsl/fslview/views/viewpanel.py
@@ -190,9 +190,9 @@ class ViewPanel(fslpanel.FSLViewPanel):
             window   = panelType(
                 self, self._overlayList, self._displayCtx, *args, **kwargs)
 
-            window.SetWindowVariant(wx.WINDOW_VARIANT_SMALL)
-
             if isinstance(window, fsltoolbar.FSLViewToolBar):
+
+                # ToolbarPane sets the panel layer to 10
                 paneInfo.ToolbarPane()
 
                 # We are going to put any new toolbars on 
@@ -219,8 +219,6 @@ class ViewPanel(fslpanel.FSLViewPanel):
                            info.dock_direction == aui.AUI_DOCK_TOP:
                             info.Layer(info.dock_layer + 1)
 
-                paneInfo.Layer(0)
-
                 # When the toolbar contents change,
                 # update the layout, so that the
                 # toolbar's new size is accommodated
-- 
GitLab