View Issue Details

IDProjectCategoryView StatusLast Update
0037724LazarusLCLpublic2020-09-28 07:42
ReporterLagunov Aleksey Assigned ToMartin Friebe  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.1 (SVN) 
Fixed in Version2.2 
Summary0037724: after rev 63756 dont work SynEdit.OnDragOver event
Descriptionin method TCustomSynEdit.DragOver always set Accept to false
TagsNo tags attached.
Fixed in Revision63883
LazTarget2.2
Widgetset
Attached Files

Relationships

related to 0037432 resolvedMartin Friebe Marhed/HiLited text, can not be dragged to copy it next to itself. 

Activities

Martin Friebe

2020-09-14 14:57

manager   ~0125537

Historically there used to be: eoDragDropEditing. SynEdit only would accept drag/drop edit if that flag was set.

But that was dropped for mouse actions.

While there now is: emDragDropEditing (SynEdit.MouseOptions). This flag can not be used to determine if drag-drop edit is active.
emDragDropEditing only adds a mouse action emcStartDragMove. And that can be added in other ways too.

Further dragging (of a SynEdit) can be started, by other means. And any dragging SynEdit with Selection is accepted (and leads to OnDragOver being ignored).

-----
I added eoAcceptDragDropEditing (SynEdit.Options2). / On by default.

Then
- with eoAcceptDragDropEditing/eoAcceptDragDropEditing a SynEdit can decide if it wants to be a drag-source (it can still be forced by calling StartDrag).
- with eoAcceptDragDropEditing a SynEdit can decide if it wants to be a drag target (for drag/drop edit)

-----
The new behaviour is now:

* If eoAcceptDragDropEditing is NOT set:
Then OnDragOver / OnDragDrop will work as expected. (And should should keep doing so in future)

* If eoAcceptDragDropEditing is SET:
The behaviour of OnDragOver / OnDragDrop is *undefined*.
- At current, it depends on SynEdit accepting Drag/Drop-edit from the drag-source (and what is a valid drag source may change in future / i.e. maybe accept from TMemo, or Edit, .....)
- It may also be, that in future OnDragOver / OnDragDrop will not be called at all, if this flag is set.

It may be, that alternative events, with more arguments/params need to be introduced, in case eoAcceptDragDropEditing is set.

---------------------
Please test with rev 63883

Issue History

Date Modified Username Field Change
2020-09-09 07:39 Lagunov Aleksey New Issue
2020-09-09 16:32 Bart Broersma Assigned To => Martin Friebe
2020-09-09 16:32 Bart Broersma Status new => assigned
2020-09-14 13:47 Martin Friebe Relationship added related to 0037432
2020-09-14 14:57 Martin Friebe Status assigned => resolved
2020-09-14 14:57 Martin Friebe Resolution open => fixed
2020-09-14 14:57 Martin Friebe Fixed in Version => 2.2
2020-09-14 14:57 Martin Friebe Fixed in Revision => 63883
2020-09-14 14:57 Martin Friebe LazTarget => 2.2
2020-09-14 14:57 Martin Friebe Note Added: 0125537
2020-09-28 07:42 Lagunov Aleksey Status resolved => closed