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
d077558e
Commit
d077558e
authored
1 year ago
by
Andrey Kleshchev
Browse files
Options
Downloads
Patches
Plain Diff
SL-19686 Fix memory leak
parent
451a89d7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
indra/newview/llinventorygallery.cpp
+15
-0
15 additions, 0 deletions
indra/newview/llinventorygallery.cpp
indra/newview/llinventorygallery.h
+1
-0
1 addition, 0 deletions
indra/newview/llinventorygallery.h
indra/newview/llpanelmaininventory.cpp
+1
-2
1 addition, 2 deletions
indra/newview/llpanelmaininventory.cpp
with
17 additions
and
2 deletions
indra/newview/llinventorygallery.cpp
+
15
−
0
View file @
d077558e
...
...
@@ -158,6 +158,13 @@ LLInventoryGallery::~LLInventoryGallery()
mUnusedItemPanels
.
pop_back
();
panelp
->
die
();
}
while
(
!
mHiddenItems
.
empty
())
{
LLPanel
*
panelp
=
mHiddenItems
.
back
();
mHiddenItems
.
pop_back
();
panelp
->
die
();
}
if
(
gInventory
.
containsObserver
(
mCategoriesObserver
))
{
...
...
@@ -490,6 +497,7 @@ void LLInventoryGallery::removeFromGalleryLast(LLInventoryGalleryItem* item)
if
(
item
->
isHidden
())
{
mHiddenItems
.
pop_back
();
// Note: item still exists!!!
return
;
}
int
n_prev
=
mItemsAddedCount
;
...
...
@@ -519,6 +527,7 @@ void LLInventoryGallery::removeFromGalleryMiddle(LLInventoryGalleryItem* item)
if
(
item
->
isHidden
())
{
mHiddenItems
.
erase
(
std
::
remove
(
mHiddenItems
.
begin
(),
mHiddenItems
.
end
(),
item
),
mHiddenItems
.
end
());
// item still exists and needs to be deleted or used!!!
return
;
}
int
n
=
mItemIndexMap
[
item
];
...
...
@@ -859,6 +868,7 @@ void LLInventoryGallery::updateRemovedItem(LLUUID item_id)
// kill removed item
if
(
item
!=
NULL
)
{
// Todo: instead of deleting, store somewhere to reuse later
item
->
die
();
}
}
...
...
@@ -1876,6 +1886,11 @@ BOOL LLInventoryGallery::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
return
handled
;
}
bool
LLInventoryGallery
::
areViewsInitialized
()
{
return
mGalleryCreated
&&
mItemBuildQuery
.
empty
();
}
bool
LLInventoryGallery
::
hasDescendents
(
const
LLUUID
&
cat_id
)
{
LLInventoryModel
::
cat_array_t
*
cats
;
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llinventorygallery.h
+
1
−
0
View file @
d077558e
...
...
@@ -134,6 +134,7 @@ class LLInventoryGallery : public LLPanel, public LLEditMenuHandler
void
setSearchType
(
LLInventoryFilter
::
ESearchType
type
);
LLInventoryFilter
::
ESearchType
getSearchType
()
{
return
mSearchType
;
}
bool
areViewsInitialized
();
bool
hasDescendents
(
const
LLUUID
&
cat_id
);
bool
hasVisibleItems
();
void
handleModifiedFilter
();
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llpanelmaininventory.cpp
+
1
−
2
View file @
d077558e
...
...
@@ -2386,7 +2386,6 @@ void LLPanelMainInventory::updateCombinationVisibility()
bool
is_gallery_empty
=
!
mCombinationGalleryPanel
->
hasVisibleItems
();
bool
show_inv_pane
=
mCombinationInventoryPanel
->
hasVisibleItems
()
||
is_gallery_empty
||
mForceShowInvLayout
;
mCombinationGalleryLayoutPanel
->
setVisible
(
!
is_gallery_empty
);
mCombinationGalleryPanel
->
setVisible
(
true
);
// to make sure root updates are getting processed
mCombinationListLayoutPanel
->
setVisible
(
show_inv_pane
);
mCombinationInventoryPanel
->
getRootFolder
()
->
setForceArrange
(
!
show_inv_pane
);
if
(
mCombinationInventoryPanel
->
hasVisibleItems
())
...
...
@@ -2402,7 +2401,7 @@ void LLPanelMainInventory::updateCombinationVisibility()
if
(
mReshapeInvLayout
&&
show_inv_pane
&&
mCombinationGalleryPanel
->
hasVisibleItems
()
&&
(
mCombinationGalleryPanel
->
hasVisibleItems
()
||
mCombinationGalleryPanel
->
areViewsInitialized
())
&&
mCombinationInventoryPanel
->
areViewsInitialized
())
{
mReshapeInvLayout
=
false
;
...
...
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