- fix: Can't copy by ctrl+dray&drop to current selection's begin/end
This commit is contained in:
parent
adcaba29d0
commit
b85b70bb4b
1
NEWS.md
1
NEWS.md
|
@ -11,6 +11,7 @@ Red Panda C++ Version 2.23
|
||||||
- enhancement: improve pointer calculation when inferencing type info
|
- enhancement: improve pointer calculation when inferencing type info
|
||||||
- enhancement: improve parsing for multiple vars defined in one line
|
- enhancement: improve parsing for multiple vars defined in one line
|
||||||
- enhancement: improve parsing result for function parameters like 'Node (&node)[10]'
|
- enhancement: improve parsing result for function parameters like 'Node (&node)[10]'
|
||||||
|
- fix: Can't copy by ctrl+dray&drop to current selection's begin/end
|
||||||
|
|
||||||
Red Panda C++ Version 2.22
|
Red Panda C++ Version 2.22
|
||||||
|
|
||||||
|
|
|
@ -6386,7 +6386,13 @@ void QSynEdit::dropEvent(QDropEvent *event)
|
||||||
|
|
||||||
BufferCoord coord = displayToBufferPos(pixelsToNearestRowColumn(event->pos().x(),
|
BufferCoord coord = displayToBufferPos(pixelsToNearestRowColumn(event->pos().x(),
|
||||||
event->pos().y()));
|
event->pos().y()));
|
||||||
if (coord>=mDragSelBeginSave && coord<=mDragSelEndSave) {
|
if (
|
||||||
|
(event->proposedAction() == Qt::DropAction::CopyAction
|
||||||
|
&& coord>mDragSelBeginSave && coord<mDragSelEndSave)
|
||||||
|
||
|
||||||
|
(event->proposedAction() != Qt::DropAction::CopyAction
|
||||||
|
&& coord>=mDragSelBeginSave && coord<=mDragSelEndSave)
|
||||||
|
) {
|
||||||
mDocument->deleteAt(mDocument->count()-1);
|
mDocument->deleteAt(mDocument->count()-1);
|
||||||
//do nothing if drag onto itself
|
//do nothing if drag onto itself
|
||||||
event->acceptProposedAction();
|
event->acceptProposedAction();
|
||||||
|
|
Loading…
Reference in New Issue