mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-24 15:09:33 -05:00
fixed keeping sort order in any case in network friend list
This commit is contained in:
parent
f8721ad60f
commit
24735c2235
@ -292,6 +292,9 @@ void NewFriendList::sortColumn(int col,Qt::SortOrder so)
|
||||
mProxyModel->sort(col,so);
|
||||
mProxyModel->setSortingEnabled(false);
|
||||
restoreExpandedPathsAndSelection(expanded_indexes, selected_indexes);
|
||||
|
||||
mLastSortColumn = col;
|
||||
mLastSortOrder = so;
|
||||
}
|
||||
|
||||
void NewFriendList::headerContextMenuRequested(QPoint /*p*/)
|
||||
@ -1133,6 +1136,9 @@ void NewFriendList::applyWhileKeepingTree(std::function<void()> predicate)
|
||||
ui->peerTreeWidget->setColumnHidden(i,!col_visible[i]);
|
||||
ui->peerTreeWidget->setColumnWidth(i,col_sizes[i]);
|
||||
}
|
||||
|
||||
// restore sorting
|
||||
sortColumn(mLastSortColumn,mLastSortOrder);
|
||||
}
|
||||
|
||||
void NewFriendList::checkInternalData(bool force)
|
||||
|
@ -126,6 +126,9 @@ private:
|
||||
std::set<RsNodeGroupId> openGroups;
|
||||
std::set<RsPgpId> openPeers;
|
||||
|
||||
int mLastSortColumn;
|
||||
Qt::SortOrder mLastSortOrder;
|
||||
|
||||
bool getOrCreateGroup(const std::string& name, uint flag, RsNodeGroupId& id);
|
||||
bool getGroupIdByName(const std::string& name, RsNodeGroupId& id);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user