mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Re-add the string to the avaliable models if drag cancelled
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
9042abc68c
commit
909be75113
1 changed files with 5 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue