Also emit loading finished signal when fetching an empty table set

When fetching data from an empty table or from an SQL query which
doesn't return any rows, we didn't emit the finishedFetch() signal which
is used to indicate that the fetching is completed. This is fixed by
this commit, so that the signal is always emitted no matter the number
of rows returned.

This fixes (probably besides other things) the current row numbers at
the bottom of the Browse Data tab when changing from a non-empty table
to an empty one.
This commit is contained in:
Martin Kleusberg
2017-11-17 13:25:04 +01:00
parent d0771cb4bd
commit dd85634f81

View File

@@ -578,8 +578,9 @@ void SqliteTableModel::fetchData(unsigned int from, unsigned to)
{
beginInsertRows(QModelIndex(), num_rows_before_insert, m_data.size()-1);
endInsertRows();
emit finishedFetch();
}
emit finishedFetch();
});
}