From 84fa07e8fe1083380c35a9e9ec45885bd2c03fac Mon Sep 17 00:00:00 2001 From: easyw <3032347+easyw@users.noreply.github.com> Date: Sat, 5 Oct 2019 01:06:10 +0200 Subject: [PATCH] fixing py2 incompatibility inside the wxForm generated dialog with this workaround the script can run both with py2 & py3 environment we should fix this issue inside the main code... --- ViaStitching/FillAreaDialog.py | 10 +++++++--- ViaStitching/FillAreaTpl.fbp | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ViaStitching/FillAreaDialog.py b/ViaStitching/FillAreaDialog.py index e9cbf91..853d380 100644 --- a/ViaStitching/FillAreaDialog.py +++ b/ViaStitching/FillAreaDialog.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- ########################################################################### -## Python code generated with wxFormBuilder (version Oct 1 2019) +## Python code generated with wxFormBuilder (version Oct 26 2018) ## http://www.wxformbuilder.org/ ## ## PLEASE DO *NOT* EDIT THIS FILE! @@ -17,9 +17,13 @@ import wx.xrc class FillAreaDialog ( wx.Dialog ): def __init__( self, parent ): - wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = u"Fill Area parameters", pos = wx.DefaultPosition, size = wx.Size( 402,540 ), style = wx.DEFAULT_DIALOG_STYLE ) + wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = u"Fill Area parameters", pos = wx.DefaultPosition, size = wx.Size( 402,580 ), style = wx.DEFAULT_DIALOG_STYLE ) - self.SetSizeHints( wx.DefaultSize, wx.DefaultSize ) + import sys + if sys.version_info[0] == 2: + self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize ) + else: + self.SetSizeHints( wx.DefaultSize, wx.DefaultSize ) bSizer3 = wx.BoxSizer( wx.VERTICAL ) diff --git a/ViaStitching/FillAreaTpl.fbp b/ViaStitching/FillAreaTpl.fbp index d5fa1cc..3e72245 100644 --- a/ViaStitching/FillAreaTpl.fbp +++ b/ViaStitching/FillAreaTpl.fbp @@ -45,7 +45,7 @@ FillAreaDialog - 402,540 + 402,580 wxDEFAULT_DIALOG_STYLE Fill Area parameters