Commit e8f0ded5 authored by Radek Bucek's avatar Radek Bucek Committed by Nate Graham
Browse files

Drag-and-drop files at the right coordinates

Summary: BUG: 416915

Reviewers: hein, #plasma, ngraham

Reviewed By: ngraham

Subscribers: ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D27078
parent 8be74e64
......@@ -364,6 +364,7 @@ void Positioner::reset()
void Positioner::move(const QVariantList &moves) {
// Don't allow moves while listing.
if (m_folderModel->status() == FolderModel::Listing) {
m_deferMovePositions = moves;
return;
}
......@@ -491,6 +492,11 @@ void Positioner::sourceStatusChanged()
if (m_deferApplyPositions && m_folderModel->status() != FolderModel::Listing) {
applyPositions();
}
if (m_deferMovePositions.count() && m_folderModel->status() != FolderModel::Listing) {
move(m_deferMovePositions);
m_deferMovePositions.clear();
}
}
void Positioner::sourceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight,
......
......@@ -134,6 +134,7 @@ class FOLDERPLUGIN_TESTS_EXPORT Positioner : public QAbstractItemModel
QStringList m_positions;
bool m_deferApplyPositions;
QVariantList m_deferMovePositions;
QTimer *m_updatePositionsTimer;
QHash<int, int> m_proxyToSource;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment