BUG: fix up gui with values that stay around too long
This commit is contained in:
parent
e539432495
commit
69b51cc245
|
@ -434,19 +434,11 @@ void CMakeSetupDialog::FillCacheManagerFromCacheGUI()
|
||||||
i != items.end(); ++i)
|
i != items.end(); ++i)
|
||||||
{
|
{
|
||||||
CPropertyItem* item = *i;
|
CPropertyItem* item = *i;
|
||||||
// check to see if the editor has removed the cache entry
|
cmCacheManager::CacheEntry *entry =
|
||||||
if(item->m_Removed)
|
|
||||||
{
|
|
||||||
cmCacheManager::GetInstance()->RemoveCacheEntry((*i)->m_propName);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
cmCacheManager::CacheEntry *entry =
|
|
||||||
cmCacheManager::GetInstance()->GetCacheEntry((const char*)item->m_propName);
|
cmCacheManager::GetInstance()->GetCacheEntry((const char*)item->m_propName);
|
||||||
if (entry)
|
if (entry)
|
||||||
{
|
{
|
||||||
entry->m_Value = item->m_curValue;
|
entry->m_Value = item->m_curValue;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "PropertyList.h"
|
#include "PropertyList.h"
|
||||||
|
#include "../cmCacheManager.h"
|
||||||
|
|
||||||
#define IDC_PROPCMBBOX 712
|
#define IDC_PROPCMBBOX 712
|
||||||
#define IDC_PROPEDITBOX 713
|
#define IDC_PROPEDITBOX 713
|
||||||
|
@ -146,28 +147,11 @@ int CPropertyList::AddProperty(const char* name,
|
||||||
return i;
|
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 it is not found, then create a new one
|
||||||
if(!pItem)
|
if(!pItem)
|
||||||
{
|
{
|
||||||
pItem = new CPropertyItem(name, value, helpString, type, comboItems);
|
pItem = new CPropertyItem(name, value, helpString, type, comboItems);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this->AddPropItem(pItem);
|
return this->AddPropItem(pItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -671,7 +655,9 @@ void CPropertyList::OnDelete()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel);
|
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);
|
this->DeleteString(m_curSel);
|
||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
|
@ -692,7 +678,9 @@ void CPropertyList::RemoveAll()
|
||||||
for(int i =0; i < c; ++i)
|
for(int i =0; i < c; ++i)
|
||||||
{
|
{
|
||||||
CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(0);
|
CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(0);
|
||||||
pItem->m_Removed = true;
|
cmCacheManager::GetInstance()->RemoveCacheEntry(pItem->m_propName);
|
||||||
|
m_PropertyItems.erase(pItem);
|
||||||
|
delete pItem;
|
||||||
this->DeleteString(0);
|
this->DeleteString(0);
|
||||||
}
|
}
|
||||||
Invalidate();
|
Invalidate();
|
||||||
|
|
|
@ -461,7 +461,7 @@ void cmDSPMakefile::WriteDSPHeader(std::ostream& fout, const char *libName,
|
||||||
{
|
{
|
||||||
// add libraries to executables and dlls (but never include
|
// add libraries to executables and dlls (but never include
|
||||||
// a library in a library, bad recursion)
|
// a library in a library, bad recursion)
|
||||||
if (!target.GetType() == cmTarget::LIBRARY ||
|
if (!(target.GetType() == cmTarget::LIBRARY) ||
|
||||||
(m_LibraryBuildType == DLL && libName != j->first))
|
(m_LibraryBuildType == DLL && libName != j->first))
|
||||||
{
|
{
|
||||||
std::string lib = j->first;
|
std::string lib = j->first;
|
||||||
|
|
|
@ -461,7 +461,7 @@ void cmDSPMakefile::WriteDSPHeader(std::ostream& fout, const char *libName,
|
||||||
{
|
{
|
||||||
// add libraries to executables and dlls (but never include
|
// add libraries to executables and dlls (but never include
|
||||||
// a library in a library, bad recursion)
|
// a library in a library, bad recursion)
|
||||||
if (!target.GetType() == cmTarget::LIBRARY ||
|
if (!(target.GetType() == cmTarget::LIBRARY) ||
|
||||||
(m_LibraryBuildType == DLL && libName != j->first))
|
(m_LibraryBuildType == DLL && libName != j->first))
|
||||||
{
|
{
|
||||||
std::string lib = j->first;
|
std::string lib = j->first;
|
||||||
|
|
Loading…
Reference in New Issue