dialogs/PouNameDialog.py
branchwxPython4
changeset 3303 0ffb41625592
parent 1881 091005ec69c4
child 3750 f62625418bff
--- a/dialogs/PouNameDialog.py	Thu Sep 02 21:36:29 2021 +0200
+++ b/dialogs/PouNameDialog.py	Thu Sep 02 22:18:14 2021 +0200
@@ -40,8 +40,7 @@
 
         self.PouNames = []
 
-        self.Bind(wx.EVT_BUTTON, self.OnOK,
-                  self.GetSizer().GetItem(2).GetSizer().GetItem(1).GetSizer().GetAffirmativeButton())
+        self.Bind(wx.EVT_BUTTON, self.OnOK, id=self.GetAffirmativeId())
 
     def OnOK(self, event):
         message = None