allowing resizing of the dialog, getting Via default values from board
This commit is contained in:
@ -51,14 +51,20 @@ class FillAreaAction(pcbnew.ActionPlugin):
|
||||
|
||||
def Run(self):
|
||||
a = FillAreaDialogEx(None)
|
||||
a.m_SizeMM.SetValue("0.8")
|
||||
#a.m_SizeMM.SetValue("0.8")
|
||||
a.m_StepMM.SetValue("2.54")
|
||||
a.m_DrillMM.SetValue("0.3")
|
||||
#a.m_DrillMM.SetValue("0.3")
|
||||
#a.m_Netname.SetValue("GND")
|
||||
a.m_ClearanceMM.SetValue("0.2")
|
||||
#a.m_ClearanceMM.SetValue("0.2")
|
||||
a.m_Star.SetValue(True)
|
||||
a.m_bitmapStitching.SetBitmap(wx.Bitmap( os.path.join(os.path.dirname(os.path.realpath(__file__)), "stitching-vias-help.png") ) )
|
||||
self.board = pcbnew.GetBoard()
|
||||
self.boardDesignSettings = self.board.GetDesignSettings()
|
||||
a.m_SizeMM.SetValue(str(pcbnew.ToMM(self.boardDesignSettings.GetCurrentViaSize())))
|
||||
a.m_DrillMM.SetValue(str(pcbnew.ToMM(self.boardDesignSettings.GetCurrentViaDrill())))
|
||||
a.m_ClearanceMM.SetValue(str(pcbnew.ToMM(self.boardDesignSettings.GetDefault().GetClearance())))
|
||||
a.SetMinSize(a.GetSize())
|
||||
|
||||
PopulateNets("GND",a)
|
||||
modal_result = a.ShowModal()
|
||||
if modal_result == wx.ID_OK:
|
||||
|
@ -17,7 +17,7 @@ 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,580 ), 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|wx.RESIZE_BORDER )
|
||||
|
||||
import sys
|
||||
if sys.version_info[0] == 2:
|
||||
|
@ -46,7 +46,7 @@
|
||||
<property name="name">FillAreaDialog</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">402,580</property>
|
||||
<property name="style">wxDEFAULT_DIALOG_STYLE</property>
|
||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="title">Fill Area parameters</property>
|
||||
<property name="tooltip"></property>
|
||||
|
Reference in New Issue
Block a user