mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
CtrlLib: ArrayCtrl fixed DnD of last item
git-svn-id: svn://ultimatepp.org/upp/trunk@7834 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
c4785ff1ae
commit
a5f1c53b30
1 changed files with 10 additions and 6 deletions
|
|
@ -2807,13 +2807,17 @@ void ArrayCtrl::InsertDrop(int line, const Vector< Vector<Value> >& data, PasteC
|
|||
if(data.GetCount() == 0)
|
||||
return;
|
||||
if(d.GetAction() == DND_MOVE && self) {
|
||||
for(int i = GetCount() - 1; i >= 0; i--) {
|
||||
if(IsSel(i)) {
|
||||
Remove(i); // Optimize!
|
||||
if(i < line)
|
||||
line--;
|
||||
if(IsMultiSelect())
|
||||
for(int i = GetCount() - 1; i >= 0; i--) {
|
||||
if(IsSel(i)) {
|
||||
Remove(i); // Optimize!
|
||||
if(i < line)
|
||||
line--;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
if(IsCursor())
|
||||
Remove(GetCursor());
|
||||
KillCursor();
|
||||
d.SetAction(DND_COPY);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue