summaryrefslogtreecommitdiff
path: root/indra/llui/lluictrl.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2021-06-25 16:12:29 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2021-06-25 16:13:38 +0300
commitf6a5bda34b4c574cf198c6c2b4131c18d3b68fc0 (patch)
tree47b0a93cbdbd314d8cd8096c6d651a0342566f18 /indra/llui/lluictrl.cpp
parentf33605f8b113f1fed84564c7618630acd5c9427a (diff)
parent467d8339c970c253dada2cf0e1eed45be66593ac (diff)
Merge branch 'master' into DRTVWR-539
Diffstat (limited to 'indra/llui/lluictrl.cpp')
-rw-r--r--indra/llui/lluictrl.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index 544a76e8d5..5924542a19 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -35,6 +35,7 @@
#include "lluictrlfactory.h"
#include "lltabcontainer.h"
#include "llaccordionctrltab.h"
+#include "lluiusage.h"
static LLDefaultChildRegistry::Register<LLUICtrl> r("ui_ctrl");
@@ -282,6 +283,7 @@ LLUICtrl::commit_signal_t::slot_type LLUICtrl::initCommitCallback(const CommitCa
else
{
std::string function_name = cb.function_name;
+ setFunctionName(function_name);
commit_callback_t* func = (CommitCallbackRegistry::getValue(function_name));
if (func)
{
@@ -422,7 +424,19 @@ BOOL LLUICtrl::canFocusChildren() const
void LLUICtrl::onCommit()
{
if (mCommitSignal)
- (*mCommitSignal)(this, getValue());
+ {
+ if (!mFunctionName.empty())
+ {
+ LL_DEBUGS("UIUsage") << "calling commit function " << mFunctionName << LL_ENDL;
+ LLUIUsage::instance().logCommand(mFunctionName);
+ LLUIUsage::instance().logControl(getPathname());
+ }
+ else
+ {
+ //LL_DEBUGS("UIUsage") << "calling commit function " << "UNKNOWN" << LL_ENDL;
+ }
+ (*mCommitSignal)(this, getValue());
+ }
}
//virtual
@@ -597,6 +611,12 @@ void LLUICtrl::setMakeInvisibleControlVariable(LLControlVariable* control)
setVisible(!(mMakeInvisibleControlVariable->getValue().asBoolean()));
}
}
+
+void LLUICtrl::setFunctionName(const std::string& function_name)
+{
+ mFunctionName = function_name;
+}
+
// static
bool LLUICtrl::controlListener(const LLSD& newvalue, LLHandle<LLUICtrl> handle, std::string type)
{