From f4c27888f160a192318500d9843af82b2ec30022 Mon Sep 17 00:00:00 2001 From: Martin Kleusberg Date: Wed, 11 Oct 2017 10:50:58 +0200 Subject: [PATCH] Fix editing data after multi-threaded loading --- src/sqlitetablemodel.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sqlitetablemodel.cpp b/src/sqlitetablemodel.cpp index 9eb46525..54c8143e 100644 --- a/src/sqlitetablemodel.cpp +++ b/src/sqlitetablemodel.cpp @@ -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; }