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
2776f8ac
Commit
2776f8ac
authored
11 years ago
by
Merov Linden
Browse files
Options
Downloads
Patches
Plain Diff
MAINT-3320 : Make inbox (Received Items) more resilients to deletion while we're at it
parent
c16de4df
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/llavataractions.cpp
+4
-0
4 additions, 0 deletions
indra/newview/llavataractions.cpp
indra/newview/llsidepanelinventory.cpp
+16
-16
16 additions, 16 deletions
indra/newview/llsidepanelinventory.cpp
indra/newview/llsidepanelinventory.h
+2
-2
2 additions, 2 deletions
indra/newview/llsidepanelinventory.h
with
22 additions
and
18 deletions
indra/newview/llavataractions.cpp
+
4
−
0
View file @
2776f8ac
...
@@ -868,6 +868,10 @@ bool LLAvatarActions::canShareSelectedItems(LLInventoryPanel* inv_panel /* = NUL
...
@@ -868,6 +868,10 @@ bool LLAvatarActions::canShareSelectedItems(LLInventoryPanel* inv_panel /* = NUL
// check selection in the panel
// check selection in the panel
LLFolderView
*
root_folder
=
inv_panel
->
getRootFolder
();
LLFolderView
*
root_folder
=
inv_panel
->
getRootFolder
();
if
(
!
root_folder
)
{
return
false
;
}
const
std
::
set
<
LLFolderViewItem
*>
inventory_selected
=
root_folder
->
getSelectionList
();
const
std
::
set
<
LLFolderViewItem
*>
inventory_selected
=
root_folder
->
getSelectionList
();
if
(
inventory_selected
.
empty
())
return
false
;
// nothing selected
if
(
inventory_selected
.
empty
())
return
false
;
// nothing selected
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llsidepanelinventory.cpp
+
16
−
16
View file @
2776f8ac
...
@@ -119,7 +119,6 @@ class LLInboxAddedObserver : public LLInventoryCategoryAddedObserver
...
@@ -119,7 +119,6 @@ class LLInboxAddedObserver : public LLInventoryCategoryAddedObserver
LLSidepanelInventory
::
LLSidepanelInventory
()
LLSidepanelInventory
::
LLSidepanelInventory
()
:
LLPanel
()
:
LLPanel
()
,
mItemPanel
(
NULL
)
,
mItemPanel
(
NULL
)
,
mInventoryPanelInbox
(
NULL
)
,
mPanelMainInventory
(
NULL
)
,
mPanelMainInventory
(
NULL
)
,
mInboxEnabled
(
false
)
,
mInboxEnabled
(
false
)
,
mCategoriesObserver
(
NULL
)
,
mCategoriesObserver
(
NULL
)
...
@@ -299,7 +298,7 @@ void LLSidepanelInventory::observeInboxModifications(const LLUUID& inboxID)
...
@@ -299,7 +298,7 @@ void LLSidepanelInventory::observeInboxModifications(const LLUUID& inboxID)
// (this can happen multiple times on the initial session that creates the inbox)
// (this can happen multiple times on the initial session that creates the inbox)
//
//
if
(
mInventoryPanelInbox
!=
NULL
)
if
(
mInventoryPanelInbox
.
get
()
!=
NULL
)
{
{
return
;
return
;
}
}
...
@@ -333,7 +332,8 @@ void LLSidepanelInventory::observeInboxModifications(const LLUUID& inboxID)
...
@@ -333,7 +332,8 @@ void LLSidepanelInventory::observeInboxModifications(const LLUUID& inboxID)
//
//
LLPanelMarketplaceInbox
*
inbox
=
getChild
<
LLPanelMarketplaceInbox
>
(
MARKETPLACE_INBOX_PANEL
);
LLPanelMarketplaceInbox
*
inbox
=
getChild
<
LLPanelMarketplaceInbox
>
(
MARKETPLACE_INBOX_PANEL
);
mInventoryPanelInbox
=
inbox
->
setupInventoryPanel
();
LLInventoryPanel
*
inventory_panel
=
inbox
->
setupInventoryPanel
();
mInventoryPanelInbox
=
inventory_panel
->
getInventoryPanelHandle
();
}
}
void
LLSidepanelInventory
::
enableInbox
(
bool
enabled
)
void
LLSidepanelInventory
::
enableInbox
(
bool
enabled
)
...
@@ -461,9 +461,9 @@ void LLSidepanelInventory::performActionOnSelection(const std::string &action)
...
@@ -461,9 +461,9 @@ void LLSidepanelInventory::performActionOnSelection(const std::string &action)
LLFolderViewItem
*
current_item
=
mPanelMainInventory
->
getActivePanel
()
->
getRootFolder
()
->
getCurSelectedItem
();
LLFolderViewItem
*
current_item
=
mPanelMainInventory
->
getActivePanel
()
->
getRootFolder
()
->
getCurSelectedItem
();
if
(
!
current_item
)
if
(
!
current_item
)
{
{
if
(
mInventoryPanelInbox
)
if
(
mInventoryPanelInbox
.
get
()
&&
mInventoryPanelInbox
.
get
()
->
getRootFolder
()
)
{
{
current_item
=
mInventoryPanelInbox
->
getRootFolder
()
->
getCurSelectedItem
();
current_item
=
mInventoryPanelInbox
.
get
()
->
getRootFolder
()
->
getCurSelectedItem
();
}
}
if
(
!
current_item
)
if
(
!
current_item
)
...
@@ -614,10 +614,10 @@ void LLSidepanelInventory::updateVerbs()
...
@@ -614,10 +614,10 @@ void LLSidepanelInventory::updateVerbs()
bool
LLSidepanelInventory
::
canShare
()
bool
LLSidepanelInventory
::
canShare
()
{
{
LLInventoryPanel
*
inbox
=
mInventoryPanelInbox
;
LLInventoryPanel
*
inbox
=
mInventoryPanelInbox
.
get
()
;
// Avoid flicker in the Recent tab while inventory is being loaded.
// Avoid flicker in the Recent tab while inventory is being loaded.
if
(
(
!
inbox
||
inbox
->
getRootFolder
()
->
getSelectionList
().
empty
())
if
(
(
!
inbox
||
!
inbox
->
getRootFolder
()
||
inbox
->
getRootFolder
()
->
getSelectionList
().
empty
())
&&
(
mPanelMainInventory
&&
!
mPanelMainInventory
->
getActivePanel
()
->
getRootFolder
()
->
hasVisibleChildren
())
)
&&
(
mPanelMainInventory
&&
!
mPanelMainInventory
->
getActivePanel
()
->
getRootFolder
()
->
hasVisibleChildren
())
)
{
{
return
false
;
return
false
;
...
@@ -652,9 +652,9 @@ LLInventoryItem *LLSidepanelInventory::getSelectedItem()
...
@@ -652,9 +652,9 @@ LLInventoryItem *LLSidepanelInventory::getSelectedItem()
if
(
!
current_item
)
if
(
!
current_item
)
{
{
if
(
mInventoryPanelInbox
)
if
(
mInventoryPanelInbox
.
get
()
&&
mInventoryPanelInbox
.
get
()
->
getRootFolder
()
)
{
{
current_item
=
mInventoryPanelInbox
->
getRootFolder
()
->
getCurSelectedItem
();
current_item
=
mInventoryPanelInbox
.
get
()
->
getRootFolder
()
->
getCurSelectedItem
();
}
}
if
(
!
current_item
)
if
(
!
current_item
)
...
@@ -671,12 +671,12 @@ U32 LLSidepanelInventory::getSelectedCount()
...
@@ -671,12 +671,12 @@ U32 LLSidepanelInventory::getSelectedCount()
{
{
int
count
=
0
;
int
count
=
0
;
std
::
set
<
LLFolderViewItem
*>
selection_list
=
mPanelMainInventory
->
getActivePanel
()
->
getRootFolder
()
->
getSelectionList
();
std
::
set
<
LLFolderViewItem
*>
selection_list
=
mPanelMainInventory
->
getActivePanel
()
->
getRootFolder
()
->
getSelectionList
();
count
+=
selection_list
.
size
();
count
+=
selection_list
.
size
();
if
((
count
==
0
)
&&
mInboxEnabled
&&
(
mInventoryPanelInbox
!=
NULL
))
if
((
count
==
0
)
&&
mInboxEnabled
&&
mInventoryPanelInbox
.
get
()
&&
mInventoryPanelInbox
.
get
()
->
getRootFolder
(
))
{
{
selection_list
=
mInventoryPanelInbox
->
getRootFolder
()
->
getSelectionList
();
selection_list
=
mInventoryPanelInbox
.
get
()
->
getRootFolder
()
->
getSelectionList
();
count
+=
selection_list
.
size
();
count
+=
selection_list
.
size
();
}
}
...
@@ -714,9 +714,9 @@ void LLSidepanelInventory::clearSelections(bool clearMain, bool clearInbox)
...
@@ -714,9 +714,9 @@ void LLSidepanelInventory::clearSelections(bool clearMain, bool clearInbox)
}
}
}
}
if
(
clearInbox
&&
mInboxEnabled
&&
(
mInventoryPanelInbox
!=
NULL
))
if
(
clearInbox
&&
mInboxEnabled
&&
mInventoryPanelInbox
.
get
(
))
{
{
mInventoryPanelInbox
->
clearSelection
();
mInventoryPanelInbox
.
get
()
->
clearSelection
();
}
}
updateVerbs
();
updateVerbs
();
...
@@ -726,9 +726,9 @@ std::set<LLFolderViewItem*> LLSidepanelInventory::getInboxSelectionList()
...
@@ -726,9 +726,9 @@ std::set<LLFolderViewItem*> LLSidepanelInventory::getInboxSelectionList()
{
{
std
::
set
<
LLFolderViewItem
*>
inventory_selected_uuids
;
std
::
set
<
LLFolderViewItem
*>
inventory_selected_uuids
;
if
(
mInboxEnabled
&&
(
mInventoryPanelInbox
!=
NULL
))
if
(
mInboxEnabled
&&
mInventoryPanelInbox
.
get
()
&&
mInventoryPanelInbox
.
get
()
->
getRootFolder
(
))
{
{
inventory_selected_uuids
=
mInventoryPanelInbox
->
getRootFolder
()
->
getSelectionList
();
inventory_selected_uuids
=
mInventoryPanelInbox
.
get
()
->
getRootFolder
()
->
getSelectionList
();
}
}
return
inventory_selected_uuids
;
return
inventory_selected_uuids
;
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llsidepanelinventory.h
+
2
−
2
View file @
2776f8ac
...
@@ -57,7 +57,7 @@ class LLSidepanelInventory : public LLPanel
...
@@ -57,7 +57,7 @@ class LLSidepanelInventory : public LLPanel
/*virtual*/
void
onOpen
(
const
LLSD
&
key
);
/*virtual*/
void
onOpen
(
const
LLSD
&
key
);
LLInventoryPanel
*
getActivePanel
();
// Returns an active inventory panel, if any.
LLInventoryPanel
*
getActivePanel
();
// Returns an active inventory panel, if any.
LLInventoryPanel
*
getInboxPanel
()
const
{
return
mInventoryPanelInbox
;
}
LLInventoryPanel
*
getInboxPanel
()
const
{
return
mInventoryPanelInbox
.
get
()
;
}
LLPanelMainInventory
*
getMainInventoryPanel
()
const
{
return
mPanelMainInventory
;
}
LLPanelMainInventory
*
getMainInventoryPanel
()
const
{
return
mPanelMainInventory
;
}
BOOL
isMainInventoryPanelActive
()
const
;
BOOL
isMainInventoryPanelActive
()
const
;
...
@@ -99,7 +99,7 @@ class LLSidepanelInventory : public LLPanel
...
@@ -99,7 +99,7 @@ class LLSidepanelInventory : public LLPanel
//
//
private
:
private
:
LLPanel
*
mInventoryPanel
;
// Main inventory view
LLPanel
*
mInventoryPanel
;
// Main inventory view
LLInventoryPanel
*
mInventoryPanelInbox
;
LLHandle
<
LLInventoryPanel
>
mInventoryPanelInbox
;
LLSidepanelItemInfo
*
mItemPanel
;
// Individual item view
LLSidepanelItemInfo
*
mItemPanel
;
// Individual item view
LLSidepanelTaskInfo
*
mTaskPanel
;
// Individual in-world object view
LLSidepanelTaskInfo
*
mTaskPanel
;
// Individual in-world object view
LLPanelMainInventory
*
mPanelMainInventory
;
LLPanelMainInventory
*
mPanelMainInventory
;
...
...
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