diff options
Diffstat (limited to 'src/gui/text/qtextcontrol.cpp')
-rw-r--r-- | src/gui/text/qtextcontrol.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp index db4c07c..ee8b751 100644 --- a/src/gui/text/qtextcontrol.cpp +++ b/src/gui/text/qtextcontrol.cpp @@ -505,9 +505,13 @@ void QTextControlPrivate::startDrag() drag->setMimeData(data); Qt::DropActions actions = Qt::CopyAction; - if (interactionFlags & Qt::TextEditable) + Qt::DropAction action; + if (interactionFlags & Qt::TextEditable) { actions |= Qt::MoveAction; - Qt::DropAction action = drag->exec(actions, Qt::MoveAction); + action = drag->exec(actions, Qt::MoveAction); + } else { + action = drag->exec(actions, Qt::CopyAction); + } if (action == Qt::MoveAction && drag->target() != contextWidget) cursor.removeSelectedText(); |