summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterland.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterland.cpp')
-rwxr-xr-xindra/newview/llfloaterland.cpp31
1 files changed, 24 insertions, 7 deletions
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 7213064746..7621c35ed2 100755
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -1517,6 +1517,8 @@ void LLPanelLandObjects::onClickRefresh(void* userdata)
LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
if (!region) return;
+ self->mBtnRefresh->setEnabled(false);
+
// ready the list for results
self->mOwnerList->deleteAllItems();
self->mOwnerList->setCommentText(LLTrans::getString("Searching"));
@@ -1576,6 +1578,7 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo
{
msg->getU32("DataExtended", "TimeStamp", most_recent_time, i);
}
+
if (owner_id.isNull())
{
continue;
@@ -1611,10 +1614,10 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo
item_params.columns.add().value(LLDate((time_t)most_recent_time)).font(FONT).column("mostrecent").type("date");
self->mOwnerList->addNameItemRow(item_params);
-
LL_DEBUGS() << "object owner " << owner_id << " (" << (is_group_owned ? "group" : "agent")
<< ") owns " << object_count << " objects." << LL_ENDL;
}
+
// check for no results
if (0 == self->mOwnerList->getItemCount())
{
@@ -1624,6 +1627,8 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo
{
self->mOwnerList->setEnabled(TRUE);
}
+
+ self->mBtnRefresh->setEnabled(true);
}
// static
@@ -2776,10 +2781,16 @@ void LLPanelLandAccess::callbackAvatarCBAccess(const uuid_vec_t& ids)
{
LLUUID id = ids[0];
LLParcel* parcel = mParcel->getParcel();
- if (parcel)
+ if (parcel && parcel->addToAccessList(id, 0))
{
- parcel->addToAccessList(id, 0);
- LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(AL_ACCESS);
+ U32 lists_to_update = AL_ACCESS;
+ // agent was successfully added to access list
+ // but we also need to check ban list to ensure that agent will not be in two lists simultaneously
+ if(parcel->removeFromBanList(id))
+ {
+ lists_to_update |= AL_BAN;
+ }
+ LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(lists_to_update);
refresh();
}
}
@@ -2828,10 +2839,16 @@ void LLPanelLandAccess::callbackAvatarCBBanned(const uuid_vec_t& ids)
{
LLUUID id = ids[0];
LLParcel* parcel = mParcel->getParcel();
- if (parcel)
+ if (parcel && parcel->addToBanList(id, 0))
{
- parcel->addToBanList(id, 0);
- LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(AL_BAN);
+ U32 lists_to_update = AL_BAN;
+ // agent was successfully added to ban list
+ // but we also need to check access list to ensure that agent will not be in two lists simultaneously
+ if (parcel->removeFromAccessList(id))
+ {
+ lists_to_update |= AL_ACCESS;
+ }
+ LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(lists_to_update);
refresh();
}
}