From 9e97f7f6844d5fd0bdaafc9a74fe762de0417dd8 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Sat, 11 Nov 2006 14:07:46 -0500 Subject: [PATCH] BUG: fix for 4028 fix scroll after delete --- Source/MFCDialog/PropertyList.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/MFCDialog/PropertyList.cpp b/Source/MFCDialog/PropertyList.cpp index 731e8707b..8765fa81b 100644 --- a/Source/MFCDialog/PropertyList.cpp +++ b/Source/MFCDialog/PropertyList.cpp @@ -736,6 +736,12 @@ void CPropertyList::OnDelete() this->HideControls(); this->SetTopIndex(0); InvalidateList(); + m_curSel += 1; + if(m_curSel > this->GetCount()) + { + m_curSel = this->GetCount(); + } + this->SetCurSel(m_curSel); } void CPropertyList::OnHelp()