diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-16 21:52:52 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-16 21:52:52 +0100 |
| commit | e6d1f5500bfa41e20f12d88ab0c6d7d4717c8465 (patch) | |
| tree | b4a632c618dd72e522f76fc58466baa0469e528c | |
| parent | d73d9307035ce751da442484cd6e23c8167393b7 (diff) | |
Only maintain selection after drag&drop of mods.
| -rw-r--r-- | src/modlistview.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/modlistview.cpp b/src/modlistview.cpp index 243e78a4..cb1d2842 100644 --- a/src/modlistview.cpp +++ b/src/modlistview.cpp @@ -1358,12 +1358,17 @@ void ModListView::dropEvent(QDropEvent* event) // is no way to deduce this except using dropIndicatorPosition())
emit dropEntered(event->mimeData(), isExpanded(index), static_cast<DropPosition>(dropIndicatorPosition()));
+ ModListDropInfo dropInfo(event->mimeData(), *m_core);
+
// see selectedIndexes()
auto [current, selected] = this->selected();
m_inDragMoveEvent = true;
QTreeView::dropEvent(event);
m_inDragMoveEvent = false;
- setSelected(current, selected);
+
+ if (dropInfo.isModDrop()) {
+ setSelected(current, selected);
+ }
}
void ModListView::timerEvent(QTimerEvent* event)
|
