diff options
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/divelogimportdialog.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp index 245c240c3..539238560 100644 --- a/qt-ui/divelogimportdialog.cpp +++ b/qt-ui/divelogimportdialog.cpp @@ -92,8 +92,11 @@ void ColumnNameView::mousePressEvent(QMouseEvent *press) model()->removeRow(atClick.row()); drag->setPixmap(pix); drag->setMimeData(mimeData); - drag->exec(); - + if (drag->exec() == Qt::IgnoreAction){ + model()->insertRow(model()->rowCount()); + QModelIndex idx = model()->index(model()->rowCount()-1, 0); + model()->setData(idx, mimeData->text()); + } } void ColumnNameView::dragLeaveEvent(QDragLeaveEvent *leave) |