Project: SWT
Bug 162198 DnD removes selection and moves caret
Reported: 2006-10-25 08:53:50 | Status: verified fixed

I20061024-1200 StyledText DnD removes selection and moves caret if it acts as text DnD source and DnD target at the same time. 1. modify Snippet210.java to have only one text widget which acts as drag source and as drop target 2. start the snippet twice 3. select some text one window and copy+drag it to the other ==> selection in first window goes away and caret moves around 4. set focus back to window one ==> caret is at a totally different location Same happens if you start dragging some text outside of the window and abort. Maybe that's a user error and I have to write some additional code but I would expect that this works our of the box.

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DragAndDropEffect.java bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/NoDragAndDropEffect.java bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/StyledTextDragAndDropEffect.java bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDragAndDropEffect.java bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDragAndDropEffect.java