Hi,
Windows 10, python 3.7.5, wxPython 4.0.6
I ran into the following:
User opens a form and the form immediately crashes/shuts down. This
occurs only if and when the font size is changed from the view menu or
ctrl ++ and then saved - when the form is reopened (then it crashes) on
Windows. It does not happen all the time just most of the time.
I was able to trace the issue to the dMenuItem. I believe the issue is
due to wx.MenuItem does not have a "setFontSize" (or it does not work)
and when the form did open the python just allowed the error.
So I changed the following:
dPemMixin->_restoreFontZoom() adding dMenuItem to the not isinstance()
def _restoreFontZoom(self):
"""Called when object is instantiated: restore the zoom based
on the form."""
if not hasattr(self.Form, "_currFontZoom"):
self.Form._restoreFontZoom()
zoom = getattr(self.Form, "_currFontZoom", 0)
dPanel = dabo.import_ui_name("dPanel")
dScrollPanel = dabo.import_ui_name("dScrollPanel")
#jfcs 10/16/2019 added below dMenuItem because it was causing
dabo to crash
dMenuItem = dabo.import_ui_name('dMenuItem')
if zoom and not isinstance(self, (dPanel, dScrollPanel,
dMenuItem)):
dabo.ui.callAfter(self._setAbsoluteFontZoom, zoom)
Johnf
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: https://leafe.com/archives
This message:
https://leafe.com/archives/byMID/[email protected]