Fix problem with decreasing size of StatusToolBar when tools are removed from toolbar.
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Mon, 30 Jul 2018 19:02:36 +0300
changeset 2255 f6a0508fa473
parent 2254 3145dcffc6ed
child 2256 5927710b5610
Fix problem with decreasing size of StatusToolBar when tools are removed from toolbar.

StatusToolBar - toolbar with tool to build, clear, connect, ...
This problem appears only in python-wxgtk3.0. In python-wxgtk2.8 there
was not such problem.

If call StatusToolBar.SetMinSize(wx.DefaultSize), all is working, but
following warning message appears:

(Beremiz.py:15155): Gtk-WARNING **: 18:42:24.115: Negative content
width -6 (allocation 1, extents 4x3) while allocating gadget (node
toolbar, owner GtkToolbar)

To avoid that StatusToolBar.GetToolBitmapSize() is used instead of wx.DefaultSize
BeremizIDE.py
--- a/BeremizIDE.py	Sun Jul 29 02:00:03 2018 +0300
+++ b/BeremizIDE.py	Mon Jul 30 19:02:36 2018 +0300
@@ -739,6 +739,7 @@
     def RefreshStatusToolBar(self):
         StatusToolBar = self.Panes["StatusToolBar"]
         StatusToolBar.ClearTools()
+        StatusToolBar.SetMinSize(StatusToolBar.GetToolBitmapSize())
 
         if self.CTR is not None: