summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterscriptlimits.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2016-07-26 11:42:54 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2016-07-26 11:42:54 +0300
commit51935673458479fccf6e2857a3ab5aeffaf11d23 (patch)
tree053e0852d115df10af38ec579ddfa68646f34697 /indra/newview/llfloaterscriptlimits.cpp
parentc8d682484ca3822c1a873f40406dc770783d4f18 (diff)
MAINT-6592 Duplicate entries are shown in Object list in Script info floater after clicking "Return" button
Diffstat (limited to 'indra/newview/llfloaterscriptlimits.cpp')
-rw-r--r--indra/newview/llfloaterscriptlimits.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp
index 7b8fc5b35b..eae16b9f03 100644
--- a/indra/newview/llfloaterscriptlimits.cpp
+++ b/indra/newview/llfloaterscriptlimits.cpp
@@ -660,6 +660,8 @@ BOOL LLPanelScriptLimitsRegionMemory::postBuild()
{
return FALSE;
}
+ list->setCommitCallback(boost::bind(&LLPanelScriptLimitsRegionMemory::checkButtonsEnabled, this));
+ checkButtonsEnabled();
//set all columns to resizable mode even if some columns will be empty
for(S32 column = 0; column < list->getNumColumns(); column++)
@@ -750,6 +752,14 @@ void LLPanelScriptLimitsRegionMemory::clearList()
getChild<LLUICtrl>("parcels_listed")->setValue(LLSD(msg_empty_string));
mObjectListItems.clear();
+ checkButtonsEnabled();
+}
+
+void LLPanelScriptLimitsRegionMemory::checkButtonsEnabled()
+{
+ LLScrollListCtrl* list = getChild<LLScrollListCtrl>("scripts_list");
+ getChild<LLButton>("highlight_btn")->setEnabled(list->getNumSelected() > 0);
+ getChild<LLButton>("return_btn")->setEnabled(list->getNumSelected() > 0);
}
// static