Merge release 2.1.2 into develop

This commit is contained in:
Janek Bevendorff 2017-02-17 16:22:26 +01:00
commit 03ab20a4b8
No known key found for this signature in database
GPG key ID: CFEC2F6850BFFA53
4 changed files with 58 additions and 33 deletions

View file

@ -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;
}