Fix editing data after multi-threaded loading

This commit is contained in:
Martin Kleusberg
2017-10-11 10:50:58 +02:00
parent 5ea6b1a76d
commit f4c27888f1

View File

@@ -363,9 +363,11 @@ bool SqliteTableModel::setTypedData(const QModelIndex& index, bool isBlob, const
if(index.row() < m_data.size())
m_data[index.row()].replace(index.column(), newValue);
lock.unlock();
emit(dataChanged(index, index));
return true;
} else {
lock.unlock();
QMessageBox::warning(0, qApp->applicationName(), tr("Error changing data:\n%1").arg(m_db.lastError()));
return false;
}