Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Black Dragon Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
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
Logue
Black Dragon Viewer
Commits
901467a4
Commit
901467a4
authored
1 year ago
by
NiranV
Browse files
Options
Downloads
Patches
Plain Diff
Fixed: Random crash on right-click with pie menus enabled. (Finally?)
parent
3d35b2f9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/newview/piemenu.cpp
+24
-16
24 additions, 16 deletions
indra/newview/piemenu.cpp
with
24 additions
and
16 deletions
indra/newview/piemenu.cpp
+
24
−
16
View file @
901467a4
...
...
@@ -320,6 +320,7 @@ void PieMenu::draw()
// check if this is a submenu or a normal click slice
PieSlice
*
currentSlice
=
dynamic_cast
<
PieSlice
*>
(
item
);
PieMenu
*
currentSubmenu
=
dynamic_cast
<
PieMenu
*>
(
item
);
// advance internally to the next slice item
cur_item_iter
++
;
...
...
@@ -355,26 +356,33 @@ void PieMenu::draw()
}
// look at the next item in the pie
LLView
*
lookAhead
=
(
*
cur_item_iter
);
// check if this is a normal click slice
PieSlice
*
lookSlice
=
dynamic_cast
<
PieSlice
*>
(
lookAhead
);
if
(
lookSlice
)
if
(
cur_item_iter
!=
mSlices
->
end
())
{
// if the next item is part of the current autohide chain as well ...
if
(
lookSlice
->
getAutohide
()
&&
!
lookSlice
->
getStartAutohide
())
//BD - Make sure we aren't iterating to an invalid piece
LLView
*
lookAhead
=
(
*
cur_item_iter
);
if
(
lookAhead
)
// THIS WAS MISSING
{
// ... it's visible and it's enabled, skip the current one.
// the first visible and enabled item in autohide chains wins
// this is useful for Sit/Stand toggles
lookSlice
->
updateEnabled
();
lookSlice
->
updateVisible
();
if
(
lookSlice
->
getVisible
()
&&
lookSlice
->
getEnabled
())
// check if this is a normal click slice
PieSlice
*
lookSlice
=
dynamic_cast
<
PieSlice
*>
(
lookAhead
);
if
(
lookSlice
)
{
continue
;
// if the next item is part of the current autohide chain as well ...
if
(
lookSlice
->
getAutohide
()
&&
!
lookSlice
->
getStartAutohide
())
{
// ... it's visible and it's enabled, skip the current one.
// the first visible and enabled item in autohide chains wins
// this is useful for Sit/Stand toggles
lookSlice
->
updateEnabled
();
lookSlice
->
updateVisible
();
if
(
lookSlice
->
getVisible
()
&&
lookSlice
->
getEnabled
())
{
continue
;
}
// this item won the autohide contest
wasAutohide
=
true
;
}
}
// this item won the autohide contest
wasAutohide
=
true
;
}
}
}
...
...
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