diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-07-12 23:48:41 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-07-12 23:48:41 (GMT) |
commit | ae25b63b6a9741eed5ded151e1a927fb619c0315 (patch) | |
tree | ce03bcb7eccaa85a10a4440c60a65d68171fd240 /Source/MFCDialog/CMakeSetupDialog.cpp | |
parent | df79a0bc471dff95453b4a33655b5c8f0a76c89a (diff) | |
download | CMake-ae25b63b6a9741eed5ded151e1a927fb619c0315.zip CMake-ae25b63b6a9741eed5ded151e1a927fb619c0315.tar.gz CMake-ae25b63b6a9741eed5ded151e1a927fb619c0315.tar.bz2 |
ENH: add a check to avoid quitting before rebuilding
Diffstat (limited to 'Source/MFCDialog/CMakeSetupDialog.cpp')
-rw-r--r-- | Source/MFCDialog/CMakeSetupDialog.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/MFCDialog/CMakeSetupDialog.cpp b/Source/MFCDialog/CMakeSetupDialog.cpp index 5acfd57..7349644 100644 --- a/Source/MFCDialog/CMakeSetupDialog.cpp +++ b/Source/MFCDialog/CMakeSetupDialog.cpp @@ -108,6 +108,7 @@ BEGIN_MESSAGE_MAP(CMakeSetupDialog, CDialog) ON_WM_SYSCOMMAND() ON_WM_PAINT() ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDOK, OnOK) ON_BN_CLICKED(IDC_BuildProjects, OnBuildProjects) ON_CBN_EDITCHANGE(IDC_WhereBuild, OnChangeWhereBuild) ON_CBN_EDITCHANGE(IDC_WhereSource, OnChangeWhereSource) @@ -444,6 +445,7 @@ void CMakeSetupDialog::OnBuildProjects() m_BuildPathChanged = false; // put the cursor back ::SetCursor(LoadCursor(NULL, IDC_ARROW)); + m_CacheEntriesList.ClearDirty(); } @@ -658,3 +660,19 @@ void CMakeSetupDialog::OnGetMinMaxInfo( MINMAXINFO FAR* lpMMI ) lpMMI->ptMinTrackSize.y = 272; } +void CMakeSetupDialog::OnOK() +{ + if(m_CacheEntriesList.IsDirty()) + { + if(MessageBox("You have changed options but not rebuilt, " + "are you sure you want to exit?", "Confirm Exit", + MB_YESNO) == IDYES) + { + CDialog::OnOK(); + } + } + else + { + CDialog::OnOK(); + } +} |