CtrlLib: Fixed ArrayCtrl RemoveSelection when last line is selected

git-svn-id: svn://ultimatepp.org/upp/trunk@6248 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2013-08-18 14:35:55 +00:00
parent d50e52f039
commit 77ed46fa04

View file

@ -2689,10 +2689,11 @@ void ArrayCtrl::DragLeave()
void ArrayCtrl::RemoveSelection()
{
for(int i = GetCount() - 1; i >= 0; i--)
if(IsSel(i))
Remove(i); // Optimize!
int ci = cursor;
KillCursor();
for(int i = GetCount() - 1; i >= 0; i--)
if(IsSel(i) || i == ci)
Remove(i); // Optimize!
}
void ArrayCtrl::InsertDrop(int line, const Vector< Vector<Value> >& data, PasteClip& d, bool self)