summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatertopobjects.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloatertopobjects.cpp')
-rwxr-xr-xindra/newview/llfloatertopobjects.cpp31
1 files changed, 19 insertions, 12 deletions
diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp
index d604b8619a..f8681fe098 100755
--- a/indra/newview/llfloatertopobjects.cpp
+++ b/indra/newview/llfloatertopobjects.cpp
@@ -118,25 +118,32 @@ void LLFloaterTopObjects::setMode(U32 mode)
// static
void LLFloaterTopObjects::handle_land_reply(LLMessageSystem* msg, void** data)
{
- LLFloaterTopObjects* instance = LLFloaterReg::getTypedInstance<LLFloaterTopObjects>("top_objects");
- if(!instance) return;
- // Make sure dialog is on screen
- LLFloaterReg::showInstance("top_objects");
- instance->handleReply(msg, data);
-
- //HACK: for some reason sometimes top scripts originally comes back
- //with no results even though they're there
- if (!instance->mObjectListIDs.size() && !instance->mInitialized)
+ LLFloaterTopObjects* instance = LLFloaterReg::getTypedInstance<LLFloaterTopObjects>("top_objects");
+ if(instance && instance->isInVisibleChain())
+ {
+ instance->handleReply(msg, data);
+ //HACK: for some reason sometimes top scripts originally comes back
+ //with no results even though they're there
+ if (!instance->mObjectListIDs.size() && !instance->mInitialized)
+ {
+ instance->onRefresh();
+ instance->mInitialized = TRUE;
+ }
+ }
+ else
{
- instance->onRefresh();
- instance->mInitialized = TRUE;
+ LLFloaterRegionInfo* region_info_floater = LLFloaterReg::getTypedInstance<LLFloaterRegionInfo>("region_info");
+ if(region_info_floater)
+ {
+ region_info_floater->enableTopButtons();
+ }
}
}
void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
{
- U32 request_flags;
+ U32 request_flags;
U32 total_count;
msg->getU32Fast(_PREHASH_RequestData, _PREHASH_RequestFlags, request_flags);