summaryrefslogtreecommitdiffstats
path: root/Source/MFCDialog/PropertyList.cpp
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-05-10 21:23:00 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-05-10 21:23:00 (GMT)
commit69b51cc2454e80d1da483d48f7ba4d5a32fc8a07 (patch)
treecdfa24baeb8220f048e3a395238b49292a4623c7 /Source/MFCDialog/PropertyList.cpp
parente5394324954f0f6d0358fa360b3adc18ea541c94 (diff)
downloadCMake-69b51cc2454e80d1da483d48f7ba4d5a32fc8a07.zip
CMake-69b51cc2454e80d1da483d48f7ba4d5a32fc8a07.tar.gz
CMake-69b51cc2454e80d1da483d48f7ba4d5a32fc8a07.tar.bz2
BUG: fix up gui with values that stay around too long
Diffstat (limited to 'Source/MFCDialog/PropertyList.cpp')
-rw-r--r--Source/MFCDialog/PropertyList.cpp26
1 files changed, 7 insertions, 19 deletions
diff --git a/Source/MFCDialog/PropertyList.cpp b/Source/MFCDialog/PropertyList.cpp
index 1e5f13b..47af0d1 100644
--- a/Source/MFCDialog/PropertyList.cpp
+++ b/Source/MFCDialog/PropertyList.cpp
@@ -3,6 +3,7 @@
#include "stdafx.h"
#include "PropertyList.h"
+#include "../cmCacheManager.h"
#define IDC_PROPCMBBOX 712
#define IDC_PROPEDITBOX 713
@@ -146,28 +147,11 @@ int CPropertyList::AddProperty(const char* name,
return i;
}
}
- // if it is not in the displayed list, then
- // check for it in the m_PropertyItems list as
- // a removed item
- for(std::set<CPropertyItem*>::iterator
- p = m_PropertyItems.begin();
- p != m_PropertyItems.end(); ++p)
- {
- if((*p)->m_propName == name)
- {
- pItem = *p;
- pItem->m_Removed = false;
- pItem->m_curValue = value;
- pItem->m_HelpString = helpString;
- Invalidate();
- }
- }
// if it is not found, then create a new one
if(!pItem)
{
pItem = new CPropertyItem(name, value, helpString, type, comboItems);
}
-
return this->AddPropItem(pItem);
}
@@ -671,7 +655,9 @@ void CPropertyList::OnDelete()
return;
}
CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel);
- pItem->m_Removed = true;
+ cmCacheManager::GetInstance()->RemoveCacheEntry(pItem->m_propName);
+ m_PropertyItems.erase(pItem);
+ delete pItem;
this->DeleteString(m_curSel);
Invalidate();
}
@@ -692,7 +678,9 @@ void CPropertyList::RemoveAll()
for(int i =0; i < c; ++i)
{
CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(0);
- pItem->m_Removed = true;
+ cmCacheManager::GetInstance()->RemoveCacheEntry(pItem->m_propName);
+ m_PropertyItems.erase(pItem);
+ delete pItem;
this->DeleteString(0);
}
Invalidate();