From 51935673458479fccf6e2857a3ab5aeffaf11d23 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 26 Jul 2016 11:42:54 +0300 Subject: MAINT-6592 Duplicate entries are shown in Object list in Script info floater after clicking "Return" button --- indra/newview/llfloaterscriptlimits.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview/llfloaterscriptlimits.cpp') 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("parcels_listed")->setValue(LLSD(msg_empty_string)); mObjectListItems.clear(); + checkButtonsEnabled(); +} + +void LLPanelScriptLimitsRegionMemory::checkButtonsEnabled() +{ + LLScrollListCtrl* list = getChild("scripts_list"); + getChild("highlight_btn")->setEnabled(list->getNumSelected() > 0); + getChild("return_btn")->setEnabled(list->getNumSelected() > 0); } // static -- cgit v1.2.3