STORM-2030 Rapidly clicking the refresh button in selected floaters may result in duplicate entries
parent
d0ef02c23a
commit
ce27987c87
|
|
@ -28,26 +28,26 @@
|
|||
|
||||
#include "linden_common.h"
|
||||
|
||||
#if defined(LL_DARWIN)
|
||||
#include <QuickTime/QuickTime.h>
|
||||
#elif defined(LL_WINDOWS)
|
||||
#include "llwin32headers.h"
|
||||
#include "MacTypes.h"
|
||||
#include "QTML.h"
|
||||
#include "Movies.h"
|
||||
#include "QDoffscreen.h"
|
||||
#include "FixMath.h"
|
||||
#include "QTLoadLibraryUtils.h"
|
||||
#endif
|
||||
|
||||
#include "llgl.h"
|
||||
|
||||
|
||||
#include "llplugininstance.h"
|
||||
#include "llpluginmessage.h"
|
||||
#include "llpluginmessageclasses.h"
|
||||
#include "media_plugin_base.h"
|
||||
|
||||
|
||||
#if LL_QUICKTIME_ENABLED
|
||||
|
||||
#if defined(LL_DARWIN)
|
||||
#include <QuickTime/QuickTime.h>
|
||||
#elif defined(LL_WINDOWS)
|
||||
#include "llwin32headers.h"
|
||||
#include "MacTypes.h"
|
||||
#include "QTML.h"
|
||||
#include "Movies.h"
|
||||
#include "QDoffscreen.h"
|
||||
#include "FixMath.h"
|
||||
#include "QTLoadLibraryUtils.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -480,6 +480,17 @@ void LLFloaterRegionInfo::refresh()
|
|||
}
|
||||
}
|
||||
|
||||
void LLFloaterRegionInfo::enableTopButtons()
|
||||
{
|
||||
getChildView("top_colliders_btn")->setEnabled(true);
|
||||
getChildView("top_scripts_btn")->setEnabled(true);
|
||||
}
|
||||
|
||||
void LLFloaterRegionInfo::disableTopButtons()
|
||||
{
|
||||
getChildView("top_colliders_btn")->setEnabled(false);
|
||||
getChildView("top_scripts_btn")->setEnabled(false);
|
||||
}
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// Local class implementation
|
||||
|
|
@ -1028,6 +1039,11 @@ void LLPanelRegionDebugInfo::onClickTopColliders(void* data)
|
|||
if(!instance) return;
|
||||
LLFloaterReg::showInstance("top_objects");
|
||||
instance->clearList();
|
||||
instance->disableRefreshBtn();
|
||||
|
||||
self->getChildView("top_colliders_btn")->setEnabled(false);
|
||||
self->getChildView("top_scripts_btn")->setEnabled(false);
|
||||
|
||||
self->sendEstateOwnerMessage(gMessageSystem, "colliders", invoice, strings);
|
||||
}
|
||||
|
||||
|
|
@ -1042,6 +1058,11 @@ void LLPanelRegionDebugInfo::onClickTopScripts(void* data)
|
|||
if(!instance) return;
|
||||
LLFloaterReg::showInstance("top_objects");
|
||||
instance->clearList();
|
||||
instance->disableRefreshBtn();
|
||||
|
||||
self->getChildView("top_colliders_btn")->setEnabled(false);
|
||||
self->getChildView("top_scripts_btn")->setEnabled(false);
|
||||
|
||||
self->sendEstateOwnerMessage(gMessageSystem, "scripts", invoice, strings);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -96,6 +96,8 @@ public:
|
|||
|
||||
void requestRegionInfo();
|
||||
void requestMeshRezInfo();
|
||||
void enableTopButtons();
|
||||
void disableTopButtons();
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
#include "llviewerregion.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llfloaterregioninfo.h"
|
||||
|
||||
//LLFloaterTopObjects* LLFloaterTopObjects::sInstance = NULL;
|
||||
|
||||
|
|
@ -268,6 +269,13 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
|
|||
format.setArg("[COUNT]", llformat("%d", total_count));
|
||||
getChild<LLUICtrl>("title_text")->setValue(LLSD(format));
|
||||
}
|
||||
|
||||
LLFloaterRegionInfo* region_info_floater = LLFloaterReg::getTypedInstance<LLFloaterRegionInfo>("region_info");
|
||||
if(region_info_floater)
|
||||
{
|
||||
region_info_floater->enableTopButtons();
|
||||
}
|
||||
getChildView("refresh_btn")->setEnabled(true);
|
||||
}
|
||||
|
||||
void LLFloaterTopObjects::onCommitObjectsList()
|
||||
|
|
@ -453,12 +461,24 @@ void LLFloaterTopObjects::onRefresh()
|
|||
msg->addStringFast(_PREHASH_Filter, filter);
|
||||
msg->addS32Fast(_PREHASH_ParcelLocalID, 0);
|
||||
|
||||
LLFloaterRegionInfo* region_info_floater = LLFloaterReg::getTypedInstance<LLFloaterRegionInfo>("region_info");
|
||||
if(region_info_floater)
|
||||
{
|
||||
region_info_floater->disableTopButtons();
|
||||
}
|
||||
disableRefreshBtn();
|
||||
|
||||
msg->sendReliable(gAgent.getRegionHost());
|
||||
|
||||
mFilter.clear();
|
||||
mFlags = 0;
|
||||
}
|
||||
|
||||
void LLFloaterTopObjects::disableRefreshBtn()
|
||||
{
|
||||
getChildView("refresh_btn")->setEnabled(false);
|
||||
}
|
||||
|
||||
void LLFloaterTopObjects::onGetByObjectName()
|
||||
{
|
||||
mFlags = STAT_FILTER_BY_OBJECT;
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ public:
|
|||
void onRefresh();
|
||||
|
||||
static void setMode(U32 mode);
|
||||
void disableRefreshBtn();
|
||||
|
||||
private:
|
||||
LLFloaterTopObjects(const LLSD& key);
|
||||
|
|
|
|||
Loading…
Reference in New Issue