mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-19 18:40:13 -06:00
SqliteTableModel: Speed up on large table in certain circumstances
This commit is contained in:
@@ -145,6 +145,10 @@ Qt::ItemFlags SqliteTableModel::flags(const QModelIndex& index) const
|
||||
|
||||
void SqliteTableModel::sort(int column, Qt::SortOrder order)
|
||||
{
|
||||
// Don't do anything when the sort order hasn't changed
|
||||
if(m_iSortColumn == column && m_sSortOrder == (order == Qt::AscendingOrder ? "ASC" : "DESC"))
|
||||
return;
|
||||
|
||||
// Save sort order
|
||||
m_iSortColumn = column;
|
||||
m_sSortOrder = (order == Qt::AscendingOrder ? "ASC" : "DESC");
|
||||
|
||||
Reference in New Issue
Block a user