mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Don't delete files on Shift+Drop on Windows.
This commit is contained in:
parent
fda2f56fd8
commit
fba1b79252
2 changed files with 4 additions and 2 deletions
|
@ -2024,7 +2024,8 @@ void Widget::dropEvent(QDropEvent *e) {
|
||||||
if (_scroll->geometry().contains(e->pos())) {
|
if (_scroll->geometry().contains(e->pos())) {
|
||||||
const auto point = mapToGlobal(e->pos());
|
const auto point = mapToGlobal(e->pos());
|
||||||
if (const auto thread = _inner->updateFromParentDrag(point)) {
|
if (const auto thread = _inner->updateFromParentDrag(point)) {
|
||||||
e->acceptProposedAction();
|
e->setDropAction(Qt::CopyAction);
|
||||||
|
e->accept();
|
||||||
controller()->content()->filesOrForwardDrop(
|
controller()->content()->filesOrForwardDrop(
|
||||||
thread,
|
thread,
|
||||||
e->mimeData());
|
e->mimeData());
|
||||||
|
|
|
@ -206,7 +206,8 @@ DragArea::Areas DragArea::SetupDragAreaToContainer(
|
||||||
|
|
||||||
*attachDragState = DragState::None;
|
*attachDragState = DragState::None;
|
||||||
updateDragAreas();
|
updateDragAreas();
|
||||||
e->acceptProposedAction();
|
e->setDropAction(Qt::CopyAction);
|
||||||
|
e->accept();
|
||||||
};
|
};
|
||||||
|
|
||||||
const auto processDragEvents = [=](not_null<QEvent*> event) {
|
const auto processDragEvents = [=](not_null<QEvent*> event) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue