Prevent drops on non-editable table cells

c++11
Stanislav Bas 10 years ago
parent d1339a643a
commit 270c17faa7

@ -51,9 +51,12 @@ void CSVWorld::DragRecordTable::dragMoveEvent(QDragMoveEvent *event)
{
QModelIndex index = indexAt(event->pos());
if (CSVWorld::DragDropUtils::canAcceptData(*event, getIndexDisplayType(index)))
{
if (index.flags() & Qt::ItemIsEditable)
{
event->accept();
}
}
else
{
event->ignore();

Loading…
Cancel
Save