mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-24 15:05:35 -04:00
save/restore hidden columns when switching which column is visible in FriendList
This commit is contained in:
parent
da21a40eda
commit
44444207f7
2 changed files with 15 additions and 5 deletions
|
@ -158,7 +158,7 @@ void RsFriendListModel::postMods()
|
|||
{
|
||||
endResetModel();
|
||||
|
||||
emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(rowCount()-1,COLUMN_THREAD_NB_COLUMNS-1,(void*)NULL));
|
||||
emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(rowCount()-1,columnCount()-1,(void*)NULL));
|
||||
}
|
||||
|
||||
int RsFriendListModel::rowCount(const QModelIndex& parent) const
|
||||
|
@ -1236,7 +1236,7 @@ void RsFriendListModel::collapseItem(const QModelIndex& index)
|
|||
mExpandedProfiles.erase(s);
|
||||
|
||||
// apparently we cannot be subtle here.
|
||||
emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(mTopLevel.size()-1,COLUMN_THREAD_NB_COLUMNS-1,(void*)NULL));
|
||||
emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(mTopLevel.size()-1,columnCount()-1,(void*)NULL));
|
||||
}
|
||||
|
||||
void RsFriendListModel::expandItem(const QModelIndex& index)
|
||||
|
@ -1258,10 +1258,10 @@ void RsFriendListModel::expandItem(const QModelIndex& index)
|
|||
if(hp) s += hp->profile_info.gpg_id.toStdString();
|
||||
|
||||
if(!s.empty())
|
||||
mExpandedProfiles.insert(s);
|
||||
mExpandedProfiles.insert(s);
|
||||
|
||||
// apparently we cannot be subtle here.
|
||||
emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(mTopLevel.size()-1,COLUMN_THREAD_NB_COLUMNS-1,(void*)NULL));
|
||||
emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(mTopLevel.size()-1,columnCount()-1,(void*)NULL));
|
||||
}
|
||||
|
||||
bool RsFriendListModel::isProfileExpanded(const EntryIndex& e) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue