mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 11:00:44 -06:00
Avoid sorting twice in Browse Data tab
When browsing a table and changing the sort order, then switching to another table, and then switching back, we would sort the table twice: once using the default sort order and then again using the previously used sort order. This results in four instead of two queries for those tables (including the COUNT queries). This commit fixes this so that only two queries are executed which should cut the run time for these cases in half. See issue #1007.
This commit is contained in:
@@ -38,7 +38,7 @@ public:
|
||||
|
||||
void setQuery(const QString& sQuery, bool dontClearHeaders = false);
|
||||
QString query() const { return m_sQuery; }
|
||||
void setTable(const QString& table, const QVector<QString> &display_format = QVector<QString>());
|
||||
void setTable(const QString& table, int sortColumn = 0, Qt::SortOrder sortOrder = Qt::AscendingOrder, const QVector<QString> &display_format = QVector<QString>());
|
||||
void setChunkSize(size_t chunksize);
|
||||
void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user