[frameworks/ktexteditor] src/view: Drag pixmap: adapt hotspot to pixmap scaling

Friedrich W. H. Kossebau <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 532e2f38aafdb7e3b30ad819d0338e86430a904e by Friedrich W. H. Kossebau.
Committed on 22/07/2026 at 15:24.
Pushed by kossebau into branch 'master'.

Drag pixmap: adapt hotspot to pixmap scaling

M  +1    -1    src/view/kateviewinternal.cpp

https://invent.kde.org/frameworks/ktexteditor/-/commit/532e2f38aafdb7e3b30ad819d0338e86430a904e

diff --git a/src/view/kateviewinternal.cpp b/src/view/kateviewinternal.cpp
index e3c6794e6..f5120b453 100644
--- a/src/view/kateviewinternal.cpp
+++ b/src/view/kateviewinternal.cpp
@@ -4165,7 +4165,7 @@ void KateViewInternal::doDrag()
      */
     const int y = lineToY(view()->m_textFolding.lineToVisibleLine(startLine));
     const QPoint pos = mapFromGlobal(QCursor::pos()) - QPoint(x, y);
-    m_dragInfo.dragObject->setHotSpot(pos);
+    m_dragInfo.dragObject->setHotSpot(pos * scale);
     m_dragInfo.dragObject->setMimeData(mimeData.release());
     m_dragInfo.dragObject->exec(Qt::MoveAction | Qt::CopyAction);
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.