mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-17 11:22:28 +12:00
Fixes a bug in #169: when dragging a folder and dropping it between two same folder split panes it is silently deleted
This commit is contained in:
parent
761286c497
commit
f99e4facab
|
@ -309,6 +309,13 @@ class outlineModel(QAbstractItemModel):
|
|||
if action == Qt.IgnoreAction:
|
||||
return True # What is that?
|
||||
|
||||
# Strangely, on some cases, we get a call to dropMimeData though
|
||||
# self.canDropMimeData returned False.
|
||||
# See https://github.com/olivierkes/manuskript/issues/169 to reproduce.
|
||||
# So we double check for safety.
|
||||
if not self.canDropMimeData(data, action, row, column, parent):
|
||||
return False
|
||||
|
||||
items = self.decodeMimeData(data)
|
||||
if items is None:
|
||||
return False
|
||||
|
|
Loading…
Reference in a new issue