Skip to content

Commit

Permalink
Merge pull request opentx#3844 from elecpower/FixesInputDnD
Browse files Browse the repository at this point in the history
Fixes Inputs Drag n Drop
  • Loading branch information
3djc authored Sep 24, 2016
2 parents acbe64c + 18ac22b commit e95a43c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion companion/src/modeledit/inputs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,17 @@ void InputsPanel::exposCopy()
QApplication::clipboard()->setMimeData(mimeData,QClipboard::Clipboard);
}

void InputsPanel::mimeExpoDropped(int index, const QMimeData *data, Qt::DropAction /*action*/)
void InputsPanel::mimeExpoDropped(int index, const QMimeData *data, Qt::DropAction action)
{
int idx = ExposlistWidget->item(index > 0 ? index-1 : 0)->data(Qt::UserRole).toByteArray().at(0);
if (action==Qt::CopyAction) {
pasteExpoMimeData(data, idx);
}
else if (action==Qt::MoveAction) {
QList<int> list = createExpoListFromSelected();
exposDeleteList(list);
pasteExpoMimeData(data, idx);
}
}

#include <iostream>
Expand Down

0 comments on commit e95a43c

Please sign in to comment.