mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-13 16:30:29 -05:00
Merge pull request #320 from keepassxreboot/hotfix/319-search-sort-order
Fix sort order when searching
This commit is contained in:
commit
d44b811b0d
@ -140,15 +140,21 @@ Entry* EntryView::entryFromIndex(const QModelIndex& index)
|
||||
void EntryView::switchToEntryListMode()
|
||||
{
|
||||
m_sortModel->hideColumn(0, false);
|
||||
sortByColumn(1, Qt::AscendingOrder); // TODO: should probably be improved
|
||||
|
||||
m_sortModel->sort(1, Qt::AscendingOrder);
|
||||
m_sortModel->sort(0, Qt::AscendingOrder);
|
||||
sortByColumn(0, Qt::AscendingOrder);
|
||||
|
||||
m_inEntryListMode = true;
|
||||
}
|
||||
|
||||
void EntryView::switchToGroupMode()
|
||||
{
|
||||
m_sortModel->hideColumn(0, true);
|
||||
sortByColumn(-1, Qt::AscendingOrder);
|
||||
|
||||
m_sortModel->sort(-1, Qt::AscendingOrder);
|
||||
m_sortModel->sort(0, Qt::AscendingOrder);
|
||||
sortByColumn(0, Qt::AscendingOrder);
|
||||
|
||||
m_inEntryListMode = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user