OSDN Git Service

Improvements to CSuperComboBox (5)
authorGreyMerlin <GreyMerlin@gmail.com>
Wed, 29 Aug 2018 19:57:02 +0000 (12:57 -0700)
committerGreyMerlin <GreyMerlin@gmail.com>
Sun, 2 Sep 2018 06:17:59 +0000 (23:17 -0700)
- Don't save OpenDialog state when closed via Esc or Cancel.  This
(the saving of the combobox states) seemed like an odd behavior of
Cancel, and is not mimicked if the dialog was closed by WinMerge's
termination.

Src/OpenView.cpp

index 7edc872..836d14b 100644 (file)
@@ -546,13 +546,12 @@ void COpenView::OnOK()
 /** 
  * @brief Called when dialog is closed via Cancel.
  *
- * Open-dialog is canceled when 'Cancel' button is selected or
- * Esc-key is pressed. Save combobox states, since user may have
- * removed items from them and don't want them to re-appear.
+ * Open-dialog is closed when 'Cancel' button is selected or
+ * Esc-key is pressed.  It is *not* called when the program is 
+ * terminated, even if the dialog is visible at the time.
  */
 void COpenView::OnCancel()
 {
-       SaveComboboxStates();
        AfxGetMainWnd()->PostMessage(WM_COMMAND, ID_FILE_CLOSE);
 }