Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
ae594765
Commit
ae594765
authored
8 years ago
by
andreykproductengine
Browse files
Options
Downloads
Patches
Plain Diff
MAINT-7225 Blocks list wasn't updating corretly for name based muting.
parent
16bf3611
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/newview/llblocklist.cpp
+36
-17
36 additions, 17 deletions
indra/newview/llblocklist.cpp
with
36 additions
and
17 deletions
indra/newview/llblocklist.cpp
+
36
−
17
View file @
ae594765
...
...
@@ -130,7 +130,14 @@ BOOL LLBlockList::handleRightMouseDown(S32 x, S32 y, MASK mask)
void
LLBlockList
::
removeListItem
(
const
LLMute
*
mute
)
{
removeItemByUUID
(
mute
->
mID
);
if
(
mute
->
mID
.
notNull
())
{
removeItemByUUID
(
mute
->
mID
);
}
else
{
removeItemByValue
(
mute
->
mName
);
}
}
void
LLBlockList
::
hideListItem
(
LLBlockedListItem
*
item
,
bool
show
)
...
...
@@ -178,7 +185,14 @@ void LLBlockList::addNewItem(const LLMute* mute)
{
item
->
highlightName
(
mNameFilter
);
}
addItem
(
item
,
item
->
getUUID
(),
ADD_BOTTOM
);
if
(
item
->
getUUID
().
notNull
())
{
addItem
(
item
,
item
->
getUUID
(),
ADD_BOTTOM
);
}
else
{
addItem
(
item
,
item
->
getName
(),
ADD_BOTTOM
);
}
}
void
LLBlockList
::
refresh
()
...
...
@@ -186,7 +200,8 @@ void LLBlockList::refresh()
bool
have_filter
=
!
mNameFilter
.
empty
();
// save selection to restore it after list rebuilt
LLUUID
selected
=
getSelectedUUID
(),
next_selected
;
LLSD
selected
=
getSelectedValue
();
LLSD
next_selected
;
if
(
mShouldAddAll
)
// creating list of blockers
{
...
...
@@ -204,14 +219,15 @@ void LLBlockList::refresh()
}
else
if
(
mActionType
==
REMOVE
)
{
if
(
selected
==
mute
.
mID
)
if
((
mute
.
mID
.
notNull
()
&&
selected
.
isUUID
()
&&
selected
.
asUUID
()
==
mute
.
mID
)
||
mute
.
mID
.
isNull
()
&&
selected
.
isString
()
&&
selected
.
asString
()
==
mute
.
mName
)
{
// we are going to remove currently selected item, so select next item and save the selection to restore it
if
(
!
selectNextItemPair
(
false
,
true
))
{
selectNextItemPair
(
true
,
true
);
}
next_selected
=
getSelected
UUID
();
if
(
!
selectNextItemPair
(
false
,
true
))
{
selectNextItemPair
(
true
,
true
);
}
next_selected
=
getSelected
Value
();
}
removeListItem
(
&
mute
);
}
...
...
@@ -237,15 +253,18 @@ void LLBlockList::refresh()
}
mPrevNameFilter
=
mNameFilter
;
if
(
getItemPair
(
selected
))
{
// restore previously selected item
selectItemPair
(
getItemPair
(
selected
),
true
);
}
else
if
(
getItemPair
(
next_selected
))
if
(
selected
.
isDefined
())
{
// previously selected item was removed, so select next item
selectItemPair
(
getItemPair
(
next_selected
),
true
);
if
(
getItemPair
(
selected
))
{
// restore previously selected item
selectItemPair
(
getItemPair
(
selected
),
true
);
}
else
if
(
next_selected
.
isDefined
()
&&
getItemPair
(
next_selected
))
{
// previously selected item was removed, so select next item
selectItemPair
(
getItemPair
(
next_selected
),
true
);
}
}
mMuteListSize
=
LLMuteList
::
getInstance
()
->
getMutes
().
size
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment