dabo Commit
Revision 4319
Date: 2008-07-24 14:27:08 -0700 (Thu, 24 Jul 2008)
Author: Paul
Trac: http://svn.dabodev.com/trac/dabo/changeset/4319
Changed:
U trunk/dabo/ui/uiwx/dDialog.py
Log:
Fix to CancelOnEscape to set escape button to btnCancel if it exists, btnNo
otherwise. The prior version could have set it to btnNo instead of btnCancel.
Diff:
Modified: trunk/dabo/ui/uiwx/dDialog.py
===================================================================
--- trunk/dabo/ui/uiwx/dDialog.py 2008-07-24 21:09:42 UTC (rev 4318)
+++ trunk/dabo/ui/uiwx/dDialog.py 2008-07-24 21:27:08 UTC (rev 4319)
@@ -278,7 +278,6 @@
mthd = self._onYes
elif id_ == wx.ID_NO:
self.btnNo = newbtn =
dabo.ui.dButton(btn.Parent)
- self.setEscapeButton(newbtn)
mthd = self._onNo
elif id_ == wx.ID_OK:
self.btnOK = newbtn =
dabo.ui.dButton(btn.Parent)
@@ -286,7 +285,6 @@
elif id_ == wx.ID_CANCEL:
self.btnCancel = newbtn =
dabo.ui.dButton(btn.Parent)
mthd = self._onCancel
- self.setEscapeButton(newbtn)
elif id_ == wx.ID_HELP:
self.btnHelp = btn
newbtn = None
@@ -305,6 +303,9 @@
self.OKButton.DefaultButton = True
elif yes:
self.YesButton.DefaultButton = True
+
+ # Force the escape button to be set appropriately:
+ self.CancelOnEscape = self.CancelOnEscape
# Wx rearranges the order of the buttons per platform
conventions, but
# doesn't rearrange the tab order for us. So, we do it manually:
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]