summaryrefslogtreecommitdiffstats
path: root/Source/MFCDialog
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2001-09-20 19:29:41 (GMT)
committerKen Martin <ken.martin@kitware.com>2001-09-20 19:29:41 (GMT)
commitb341539bc1b669431bc89902de202233408ad85f (patch)
treeeab5c4e45a6708a10d661b81b3b7b4bd6ba7a7b7 /Source/MFCDialog
parentbaa28efd107a3efa821034a64a1c737d3c58ad89 (diff)
downloadCMake-b341539bc1b669431bc89902de202233408ad85f.zip
CMake-b341539bc1b669431bc89902de202233408ad85f.tar.gz
CMake-b341539bc1b669431bc89902de202233408ad85f.tar.bz2
ENH: check for values that switch to internal, can happen with a load cache command
Diffstat (limited to 'Source/MFCDialog')
-rw-r--r--Source/MFCDialog/CMakeSetupDialog.cpp11
-rw-r--r--Source/MFCDialog/PropertyList.cpp14
-rw-r--r--Source/MFCDialog/PropertyList.h1
3 files changed, 16 insertions, 10 deletions
diff --git a/Source/MFCDialog/CMakeSetupDialog.cpp b/Source/MFCDialog/CMakeSetupDialog.cpp
index 10c5be6..520cdfd 100644
--- a/Source/MFCDialog/CMakeSetupDialog.cpp
+++ b/Source/MFCDialog/CMakeSetupDialog.cpp
@@ -601,6 +601,7 @@ void CMakeSetupDialog::FillCacheGUIFromCacheManager()
);
break;
case cmCacheManager::INTERNAL:
+ m_CacheEntriesList.RemoveProperty(key);
break;
}
}
@@ -645,16 +646,6 @@ void CMakeSetupDialog::LoadCacheFromDiskToGUI()
{
m_GeneratorChoiceString = curGen.c_str();
this->UpdateData(FALSE);
- // m_GeneratorChoice.SetWindowText(m_GeneratorChoiceString);
-// int c = m_GeneratorChoice.GetCount();
-// int j = m_GeneratorChoice.FindStringExact(0, curGen.c_str());
-// if (j != CB_ERR)
-// {
-// m_GeneratorChoice.SetCurSel(j);
-// }
-
-// m_GeneratorChoice.SelectString(0, curGen.c_str());
-// this->UpdateData(FALSE);
}
}
}
diff --git a/Source/MFCDialog/PropertyList.cpp b/Source/MFCDialog/PropertyList.cpp
index e5b347b..a114100 100644
--- a/Source/MFCDialog/PropertyList.cpp
+++ b/Source/MFCDialog/PropertyList.cpp
@@ -614,6 +614,20 @@ void CPropertyList::OnRButtonUp( UINT nFlags, CPoint point )
rect.TopLeft().y + point.y, this, NULL);
}
+void CPropertyList::RemoveProperty(const char* name)
+{
+ for(int i =0; i < this->GetCount(); ++i)
+ {
+ CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(i);
+ if(pItem->m_propName == name)
+ {
+ m_PropertyItems.erase(pItem);
+ delete pItem;
+ this->DeleteString(i);
+ return;
+ }
+ }
+}
void CPropertyList::OnDelete()
{
diff --git a/Source/MFCDialog/PropertyList.h b/Source/MFCDialog/PropertyList.h
index 3db0474..000f6c9 100644
--- a/Source/MFCDialog/PropertyList.h
+++ b/Source/MFCDialog/PropertyList.h
@@ -67,6 +67,7 @@ public:
int type,
const char* comboItems,
bool reverseOrder);
+ void RemoveProperty(const char* name);
void HideControls();
std::set<CPropertyItem*> GetItems()
{