14.31: the last two drag events through DragAt
This commit is contained in:
2 files changed
+4
-2
No files matched your search
@@ -1,3 +1,4 @@
|
||||
#include "DragAt.h"
|
||||
#include "ContentView.h"
|
||||
#include "IO/ImageFileDrop.h"
|
||||
#include "DNGFixture.h"
|
||||
@@ -83,7 +84,7 @@ QStringList names(const EditorSession &session)
|
||||
|
||||
bool dropOn(QWidget &target, QMimeData *data, QPoint at, Qt::KeyboardModifiers modifiers = Qt::NoModifier)
|
||||
{
|
||||
QDragEnterEvent entered(at, Qt::CopyAction, data, Qt::LeftButton, modifiers);
|
||||
QDragEnterEvent entered(DragAt(at), Qt::CopyAction, data, Qt::LeftButton, modifiers);
|
||||
QApplication::sendEvent(&target, &entered);
|
||||
QDropEvent dropped(at, Qt::CopyAction, data, Qt::LeftButton, modifiers);
|
||||
QApplication::sendEvent(&target, &dropped);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "DragAt.h"
|
||||
#include "Document/ProjectWorkspace.h"
|
||||
#include "Rendering/EditorCanvas.h"
|
||||
#include "UI/LayerIcons.h"
|
||||
@@ -106,7 +107,7 @@ struct Listed {
|
||||
bool drop(QMimeData *data, QPoint listPoint)
|
||||
{
|
||||
const QPointF inViewport = list.viewport()->mapFromParent(listPoint);
|
||||
QDragEnterEvent enter(inViewport.toPoint(), Qt::CopyAction, data, Qt::LeftButton, Qt::AltModifier);
|
||||
QDragEnterEvent enter(DragAt(inViewport.toPoint()), Qt::CopyAction, data, Qt::LeftButton, Qt::AltModifier);
|
||||
QApplication::sendEvent(list.viewport(), &enter);
|
||||
QDropEvent drop(inViewport, Qt::CopyAction, data, Qt::LeftButton, Qt::AltModifier);
|
||||
QApplication::sendEvent(list.viewport(), &drop);
|
||||
|
||||
Reference in new issue
Block a user