summaryrefslogtreecommitdiffstats
path: root/Source/MFCDialog
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-07-26 14:18:26 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-07-26 14:18:26 (GMT)
commitcb858f511ed262977eac99b5a3800f549702ec62 (patch)
treeb5620e3e824554b74057a137fb55386d21776416 /Source/MFCDialog
parent4fe6473b8b7dad97871d361d3d07e808d932a2c4 (diff)
downloadCMake-cb858f511ed262977eac99b5a3800f549702ec62.zip
CMake-cb858f511ed262977eac99b5a3800f549702ec62.tar.gz
CMake-cb858f511ed262977eac99b5a3800f549702ec62.tar.bz2
ENH: change the logic of disabling the ok button a bit
Diffstat (limited to 'Source/MFCDialog')
-rw-r--r--Source/MFCDialog/CMakeSetupDialog.cpp14
-rw-r--r--Source/MFCDialog/PropertyList.cpp1
2 files changed, 11 insertions, 4 deletions
diff --git a/Source/MFCDialog/CMakeSetupDialog.cpp b/Source/MFCDialog/CMakeSetupDialog.cpp
index 635be38..f03e0f2 100644
--- a/Source/MFCDialog/CMakeSetupDialog.cpp
+++ b/Source/MFCDialog/CMakeSetupDialog.cpp
@@ -164,7 +164,6 @@ BOOL CMakeSetupDialog::OnInitDialog()
cmMakefile::GetMinorVersion());
SetDlgItemText(IDC_CMAKE_VERSION, tmp);
this->UpdateData(FALSE);
- m_OKButton.EnableWindow(false);
return TRUE; // return TRUE unless you set the focus to a control
}
@@ -455,8 +454,6 @@ void CMakeSetupDialog::RunCMake(bool generateProjectFiles)
void CMakeSetupDialog::OnConfigure()
{
this->RunCMake(false);
- // if cache has values then enb
- m_OKButton.EnableWindow(true);
}
@@ -519,6 +516,15 @@ void CMakeSetupDialog::FillCacheGUIFromCacheManager()
}
const cmCacheManager::CacheEntryMap &cache =
cmCacheManager::GetInstance()->GetCacheMap();
+ if(cache.size() == 0)
+ {
+ m_OKButton.EnableWindow(false);
+ }
+ else
+ {
+ m_OKButton.EnableWindow(true);
+ }
+
for(cmCacheManager::CacheEntryMap::const_iterator i = cache.begin();
i != cache.end(); ++i)
{
@@ -704,7 +710,7 @@ void CMakeSetupDialog::OnGetMinMaxInfo( MINMAXINFO FAR* lpMMI )
void CMakeSetupDialog::OnCancel()
{
- if(m_OKButton.IsWindowEnabled())
+ if(m_CacheEntriesList.IsDirty())
{
if(MessageBox("You have changed options but not rebuilt, "
"are you sure you want to exit?", "Confirm Exit",
diff --git a/Source/MFCDialog/PropertyList.cpp b/Source/MFCDialog/PropertyList.cpp
index f60d423..e5b347b 100644
--- a/Source/MFCDialog/PropertyList.cpp
+++ b/Source/MFCDialog/PropertyList.cpp
@@ -652,6 +652,7 @@ void CPropertyList::RemoveAll()
delete pItem;
this->DeleteString(0);
}
+ m_Dirty = false;
this->HideControls();
InvalidateList();
}