Add close button to damage pattern editor
This commit is contained in:
@@ -141,6 +141,11 @@ class DmgPatternEditorDlg (wx.Dialog):
|
||||
|
||||
mainSizer.Add(contentSizer, 1, wx.EXPAND, 0)
|
||||
|
||||
if "wxGTK" in wx.PlatformInfo:
|
||||
self.closeBtn = wx.Button( self, wx.ID_ANY, u"Close", wx.DefaultPosition, wx.DefaultSize, 0 )
|
||||
mainSizer.Add( self.closeBtn, 0, wx.ALL|wx.ALIGN_RIGHT, 5 )
|
||||
self.closeBtn.Bind(wx.EVT_BUTTON, self.closeEvent)
|
||||
|
||||
self.SetSizer(mainSizer)
|
||||
|
||||
importExport = (("Import", wx.ART_FILE_OPEN, "from"),
|
||||
@@ -192,6 +197,9 @@ class DmgPatternEditorDlg (wx.Dialog):
|
||||
|
||||
self.patternChanged()
|
||||
|
||||
def closeEvent(self, event):
|
||||
self.Destroy()
|
||||
|
||||
def ValuesUpdated(self, event=None):
|
||||
if self.block:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user