Changeset 4319

Show
Ignore:
Timestamp:
07/24/08 14:27:08 (1 month ago)
Author:
paul
Message:

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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dabo/ui/uiwx/dDialog.py

    r4318 r4319  
    279279            elif id_ == wx.ID_NO: 
    280280                self.btnNo = newbtn = dabo.ui.dButton(btn.Parent) 
    281                 self.setEscapeButton(newbtn) 
    282281                mthd = self._onNo 
    283282            elif id_ == wx.ID_OK: 
     
    287286                self.btnCancel = newbtn = dabo.ui.dButton(btn.Parent) 
    288287                mthd = self._onCancel 
    289                 self.setEscapeButton(newbtn) 
    290288            elif id_ == wx.ID_HELP: 
    291289                self.btnHelp = btn 
     
    306304        elif yes: 
    307305            self.YesButton.DefaultButton = True 
     306 
     307        # Force the escape button to be set appropriately: 
     308        self.CancelOnEscape = self.CancelOnEscape 
    308309             
    309310        # Wx rearranges the order of the buttons per platform conventions, but