diff options
Diffstat (limited to 'qt-ui/divelogimportdialog.cpp')
-rw-r--r-- | qt-ui/divelogimportdialog.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp index 0b6dfb7d4..245c240c3 100644 --- a/qt-ui/divelogimportdialog.cpp +++ b/qt-ui/divelogimportdialog.cpp @@ -144,7 +144,15 @@ void ColumnDropCSVView::dragMoveEvent(QDragMoveEvent *event) void ColumnDropCSVView::dropEvent(QDropEvent *event) { + QModelIndex curr = indexAt(event->pos()); + if (!curr.isValid() || curr.row() != 0) + return; + event->acceptProposedAction(); + const QMimeData *mimeData = event->mimeData(); + if (mimeData->hasText()) { + model()->setData(curr, QVariant(mimeData->text())); + } } ColumnNameResult::ColumnNameResult(QObject *parent) : QAbstractTableModel(parent) |