mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-04 13:07:38 +03:00
Merge pull request #320 from keepassxreboot/hotfix/319-search-sort-order
Fix sort order when searching
This commit is contained in:
commit
d44b811b0d
1 changed files with 8 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue