diff options
author | Jonathan Yap <none@none> | 2014-05-12 16:25:48 -0400 |
---|---|---|
committer | Jonathan Yap <none@none> | 2014-05-12 16:25:48 -0400 |
commit | ce27987c872cdaf2ec781644bc2ceb1a336a0a25 (patch) | |
tree | 64fcd26157ad2648d7cfc776e21025157fbde8de /indra/newview/llfloatertopobjects.cpp | |
parent | d0ef02c23a7a37c8c9bfe3a86bae88bb811fc9fe (diff) |
STORM-2030 Rapidly clicking the refresh button in selected floaters may result in duplicate entries
Diffstat (limited to 'indra/newview/llfloatertopobjects.cpp')
-rwxr-xr-x | indra/newview/llfloatertopobjects.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp index 7530c72dd2..3a167cfc77 100755 --- a/indra/newview/llfloatertopobjects.cpp +++ b/indra/newview/llfloatertopobjects.cpp @@ -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; |