mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-21 05:39:11 -04:00
fixed wrong implementation of parentRow causing loss of selected elements
This commit is contained in:
parent
da0732b5ad
commit
e5273fb887
1 changed files with 4 additions and 4 deletions
|
@ -304,10 +304,10 @@ uint32_t RsFriendListModel::EntryIndex::parentRow(uint32_t nb_groups) const
|
||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
case ENTRY_TYPE_UNKNOWN : return 0;
|
case ENTRY_TYPE_UNKNOWN : return -1;
|
||||||
case ENTRY_TYPE_GROUP : return group_index;
|
case ENTRY_TYPE_GROUP : return -1;
|
||||||
case ENTRY_TYPE_PROFILE : return (group_index==UNDEFINED_GROUP_INDEX_VALUE)?(profile_index+nb_groups):profile_index;
|
case ENTRY_TYPE_PROFILE : return (group_index==UNDEFINED_GROUP_INDEX_VALUE)?(-1):group_index;
|
||||||
case ENTRY_TYPE_NODE : return node_index;
|
case ENTRY_TYPE_NODE : return (group_index==UNDEFINED_GROUP_INDEX_VALUE)?(profile_index+nb_groups):profile_index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue