Commit 42f7a3fe authored by Mark Nauwelaerts's avatar Mark Nauwelaerts
Browse files

session: sort list by ascending name

See also 2ce0f42e

The referenced bug report requests to restore order by "Session Name",
but presumably expects so in ascending alphabetical order (as was),
rather than descending (which makes more sense for "Last opened").
parent b4e387bf
...@@ -372,7 +372,7 @@ void KateSessionManageDialog::updateSessionList() ...@@ -372,7 +372,7 @@ void KateSessionManageDialog::updateSessionList()
m_sessionList->header()->setSectionResizeMode(0, QHeaderView::Stretch); // stretch "Session Name" column m_sessionList->header()->setSectionResizeMode(0, QHeaderView::Stretch); // stretch "Session Name" column
m_sessionList->resizeColumnToContents(1); // Fit "Files" column m_sessionList->resizeColumnToContents(1); // Fit "Files" column
m_sessionList->resizeColumnToContents(2); // Fit "Last update" column m_sessionList->resizeColumnToContents(2); // Fit "Last update" column
m_sessionList->sortByColumn(0, Qt::DescendingOrder); // sort by "Session Name" column.. don't worry, it only sorts when the model data changes. m_sessionList->sortByColumn(0, Qt::AscendingOrder); // sort by "Session Name" column.. don't worry, it only sorts when the model data changes.
if (!preferredItem) { if (!preferredItem) {
preferredItem = currSessionItem ? currSessionItem : activeSessionItem; preferredItem = currSessionItem ? currSessionItem : activeSessionItem;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment