mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-14 08:50:08 -05:00
Fix sort order when searching, resolves #319
This commit is contained in:
parent
ebdb10e7f9
commit
b61ecabed3
@ -140,15 +140,21 @@ Entry* EntryView::entryFromIndex(const QModelIndex& index)
|
|||||||
void EntryView::switchToEntryListMode()
|
void EntryView::switchToEntryListMode()
|
||||||
{
|
{
|
||||||
m_sortModel->hideColumn(0, false);
|
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);
|
sortByColumn(0, Qt::AscendingOrder);
|
||||||
|
|
||||||
m_inEntryListMode = true;
|
m_inEntryListMode = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntryView::switchToGroupMode()
|
void EntryView::switchToGroupMode()
|
||||||
{
|
{
|
||||||
m_sortModel->hideColumn(0, true);
|
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);
|
sortByColumn(0, Qt::AscendingOrder);
|
||||||
|
|
||||||
m_inEntryListMode = false;
|
m_inEntryListMode = false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user