*CtrlLib: Fixed D&D in DocEdit

git-svn-id: svn://ultimatepp.org/upp/trunk@4349 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2011-12-26 16:54:44 +00:00
commit ab25b501b6

View file

@ -513,6 +513,7 @@ void DocEdit::DragAndDrop(Point p, PasteClip& d)
NextUndo();
int a = sb;
int sell, selh;
WString txt = GetWString(d);
if(GetSelection(sell, selh)) {
if(c >= sell && c < selh) {
RemoveSelection();
@ -528,7 +529,7 @@ void DocEdit::DragAndDrop(Point p, PasteClip& d)
d.SetAction(DND_COPY);
}
}
int count = Insert(c, GetWString(d));
int count = Insert(c, txt);
sb = a;
SetFocus();
SetSelection(c, c + count);