mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 03:20:08 +01:00
plotcanvas: avoid trying to adjust scrollbars if nothing drawn
For example, if Clear() is called on a plotcanvas, _adjustScrollbars() will not work, so avoid trying to do it if nothing is drawn currently.
This commit is contained in:
@@ -707,7 +707,8 @@ class PlotCanvas(wx.Panel):
|
||||
|
||||
def _do_update():
|
||||
self.Layout()
|
||||
self._adjustScrollbars()
|
||||
if self.last_draw is not None:
|
||||
self._adjustScrollbars()
|
||||
wx.CallAfter(_do_update)
|
||||
|
||||
def SetUseScientificNotation(self, useScientificNotation):
|
||||
|
||||
Reference in New Issue
Block a user