summaryrefslogtreecommitdiffstats
path: root/Source/MFCDialog/PropertyList.cpp
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-07-12 23:48:41 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-07-12 23:48:41 (GMT)
commitae25b63b6a9741eed5ded151e1a927fb619c0315 (patch)
treece03bcb7eccaa85a10a4440c60a65d68171fd240 /Source/MFCDialog/PropertyList.cpp
parentdf79a0bc471dff95453b4a33655b5c8f0a76c89a (diff)
downloadCMake-ae25b63b6a9741eed5ded151e1a927fb619c0315.zip
CMake-ae25b63b6a9741eed5ded151e1a927fb619c0315.tar.gz
CMake-ae25b63b6a9741eed5ded151e1a927fb619c0315.tar.bz2
ENH: add a check to avoid quitting before rebuilding
Diffstat (limited to 'Source/MFCDialog/PropertyList.cpp')
-rw-r--r--Source/MFCDialog/PropertyList.cpp23
1 files changed, 16 insertions, 7 deletions
diff --git a/Source/MFCDialog/PropertyList.cpp b/Source/MFCDialog/PropertyList.cpp
index 977b62f..d18f30e 100644
--- a/Source/MFCDialog/PropertyList.cpp
+++ b/Source/MFCDialog/PropertyList.cpp
@@ -143,8 +143,7 @@ int CPropertyList::AddProperty(const char* name,
{
pItem->m_curValue = value;
pItem->m_HelpString = helpString;
- m_Dirty = true;
- Invalidate();
+ InvalidateList();
}
return i;
}
@@ -350,8 +349,11 @@ void CPropertyList::OnChangeEditBox()
m_editBox.GetWindowText(newStr);
CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel);
- pItem->m_curValue = newStr;
- m_Dirty = true;
+ if(pItem->m_curValue != newStr)
+ {
+ pItem->m_curValue = newStr;
+ m_Dirty = true;
+ }
}
void CPropertyList::OnCheckBox()
@@ -408,7 +410,7 @@ void CPropertyList::OnButton()
cmSystemTools::ConvertToUnixSlashes(path);
pItem->m_curValue = path.c_str();
m_Dirty = true;
- Invalidate();
+ InvalidateList();
}
}
else if (pItem->m_nItemType == CPropertyList::PATH)
@@ -427,7 +429,7 @@ void CPropertyList::OnButton()
cmSystemTools::ConvertToUnixSlashes(path);
pItem->m_curValue = path.c_str();
m_Dirty = true;
- Invalidate();
+ InvalidateList();
}
}
}
@@ -579,7 +581,7 @@ void CPropertyList::OnDelete()
m_PropertyItems.erase(pItem);
delete pItem;
this->DeleteString(m_curSel);
- Invalidate();
+ InvalidateList();
}
void CPropertyList::OnHelp()
@@ -603,5 +605,12 @@ void CPropertyList::RemoveAll()
delete pItem;
this->DeleteString(0);
}
+ InvalidateList();
+}
+
+void CPropertyList::InvalidateList()
+{
Invalidate();
+ m_Dirty = true;
}
+