From 0b6842f78a1ba1c98e7e6a4d6105b45be8492c5a Mon Sep 17 00:00:00 2001 From: Paul McCarthy <pauld.mccarthy@gmail.com> Date: Tue, 21 Oct 2014 23:12:20 +0100 Subject: [PATCH] Fixed bug - ortho panel was not laying out properly when a different view panel was opened/closed. --- fsl/fslview/views/orthopanel.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fsl/fslview/views/orthopanel.py b/fsl/fslview/views/orthopanel.py index 0239094db..266ef78b5 100644 --- a/fsl/fslview/views/orthopanel.py +++ b/fsl/fslview/views/orthopanel.py @@ -326,10 +326,12 @@ class OrthoPanel(canvaspanel.CanvasPanel): Called whenever the panel is resized. Makes sure that the canvases are laid out nicely. """ - - # allow default resize event handler to run ev.Skip() - self._layoutChanged() + + # Re-layout the canvases asynchronously as, + # in some cases, resizes to this panel + # aren't immediately applied to child panels + wx.CallAfter(self._layoutChanged) def _refreshLabels(self, *a): -- GitLab