From 1fe5db9fa686b49710168fe34583ee2a8be63ad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Mon, 9 Sep 2019 17:34:50 +0200 Subject: [PATCH] libgui/GuiCanvasPanel.py:{onPanelSize,__init__}(): call _updateScrollBars() on EVT_SIZE. --- libgui/GuiCanvasPanel.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libgui/GuiCanvasPanel.py b/libgui/GuiCanvasPanel.py index d87bb43..0afe743 100644 --- a/libgui/GuiCanvasPanel.py +++ b/libgui/GuiCanvasPanel.py @@ -110,6 +110,10 @@ class GuiCanvasPanel(wx.ScrolledWindow): def onPanelPaint(self, event): self.backend.onPanelPaintEvent(self.canvas.size, self.defaultCellSize, self.GetClientSize(), self, self.GetViewStart()) # }}} + # {{{ onPanelSize(self, event) + def onPanelSize(self, event): + self._updateScrollBars(); event.Skip(); + # }}} # # __init__(self, parent, parentFrame, backend, canvas, defaultCanvasPos, defaultCanvasSize, defaultCellSize, interface): initialisation method @@ -128,5 +132,6 @@ class GuiCanvasPanel(wx.ScrolledWindow): for eventType in (wx.EVT_LEFT_DOWN, wx.EVT_MOTION, wx.EVT_RIGHT_DOWN): self.Bind(eventType, self.onPanelInput) self.Bind(wx.EVT_PAINT, self.onPanelPaint) + self.Bind(wx.EVT_SIZE, self.onPanelSize) # vim:expandtab foldmethod=marker sw=4 ts=4 tw=120