[graphics/drawy] src/widgets/keybindings: fix: sort items before passing them to mime handlers

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit f78832bf1941679b97e6dd7d3355df5c9d1765c8 by Laurent Montel, on behalf of Nikolay Kochulin.
Committed on 06/08/2026 at 18:09.
Pushed by mlaurent into branch 'master'.

fix: sort items before passing them to mime handlers

M  +2    -1    src/widgets/keybindings/actionmanager.cpp

https://invent.kde.org/graphics/drawy/-/commit/f78832bf1941679b97e6dd7d3355df5c9d1765c8

diff --git a/src/widgets/keybindings/actionmanager.cpp b/src/widgets/keybindings/actionmanager.cpp
index 1b6c8f02..b1d4d1cf 100644
--- a/src/widgets/keybindings/actionmanager.cpp
+++ b/src/widgets/keybindings/actionmanager.cpp
@@ -345,7 +345,8 @@ void ActionManager::copy()
         return;
     }
 
-    const QList<std::shared_ptr<Item>> &items{selectedItems.begin(), selectedItems.end()};
+    QList<std::shared_ptr<Item>> items{selectedItems.begin(), selectedItems.end()};
+    m_context->spatialContext()->quadtree().reorder(items);
 
     QMimeData *data = new QMimeData;
     m_context->mimeManager()->writeData(*data, items);
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.