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...
This commit is contained in:
easyw
2019-10-05 01:06:10 +02:00
parent dd1b053f91
commit 84fa07e8fe
2 changed files with 8 additions and 4 deletions

View File

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*- # -*- 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/ ## http://www.wxformbuilder.org/
## ##
## PLEASE DO *NOT* EDIT THIS FILE! ## PLEASE DO *NOT* EDIT THIS FILE!
@ -17,8 +17,12 @@ import wx.xrc
class FillAreaDialog ( wx.Dialog ): class FillAreaDialog ( wx.Dialog ):
def __init__( self, parent ): 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 )
import sys
if sys.version_info[0] == 2:
self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )
else:
self.SetSizeHints( wx.DefaultSize, wx.DefaultSize ) self.SetSizeHints( wx.DefaultSize, wx.DefaultSize )
bSizer3 = wx.BoxSizer( wx.VERTICAL ) bSizer3 = wx.BoxSizer( wx.VERTICAL )

View File

@ -45,7 +45,7 @@
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">FillAreaDialog</property> <property name="name">FillAreaDialog</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size">402,540</property> <property name="size">402,580</property>
<property name="style">wxDEFAULT_DIALOG_STYLE</property> <property name="style">wxDEFAULT_DIALOG_STYLE</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="title">Fill Area parameters</property> <property name="title">Fill Area parameters</property>