summaryrefslogtreecommitdiff
path: root/indra/llui/lluictrl.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-06-05 19:05:43 -0700
committerRichard Linden <none@none>2013-06-05 19:05:43 -0700
commit0a96b47663c99914c587cdcb8bcdc096bbf55fa3 (patch)
tree67bca4958927ed7f6df423de05e42cd271292391 /indra/llui/lluictrl.cpp
parentdcfb18373eca7986a73d8b9a1d34970cc0a23ed9 (diff)
parenta74b5dfa923f8eeccc9b786143f0f832de3ad450 (diff)
merge with viewer-release
Diffstat (limited to 'indra/llui/lluictrl.cpp')
-rwxr-xr-xindra/llui/lluictrl.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index b9c843e931..08358484ef 100755
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -118,6 +118,7 @@ LLUICtrl::LLUICtrl(const LLUICtrl::Params& p, const LLViewModelPtr& viewmodel)
mDoubleClickSignal(NULL),
mTransparencyType(TT_DEFAULT)
{
+ memClaim(viewmodel.get());
}
void LLUICtrl::initFromParams(const Params& p)
@@ -940,7 +941,7 @@ boost::signals2::connection LLUICtrl::setCommitCallback( boost::function<void (L
}
boost::signals2::connection LLUICtrl::setValidateBeforeCommit( boost::function<bool (const LLSD& data)> cb )
{
- if (!mValidateSignal) mValidateSignal = new enable_signal_t();
+ if (!mValidateSignal) mValidateSignal = memClaim(new enable_signal_t());
return mValidateSignal->connect(boost::bind(cb, _2));
}
@@ -1003,55 +1004,55 @@ boost::signals2::connection LLUICtrl::setValidateCallback(const EnableCallbackPa
boost::signals2::connection LLUICtrl::setCommitCallback( const commit_signal_t::slot_type& cb )
{
- if (!mCommitSignal) mCommitSignal = new commit_signal_t();
+ if (!mCommitSignal) mCommitSignal = memClaim(new commit_signal_t());
return mCommitSignal->connect(cb);
}
boost::signals2::connection LLUICtrl::setValidateCallback( const enable_signal_t::slot_type& cb )
{
- if (!mValidateSignal) mValidateSignal = new enable_signal_t();
+ if (!mValidateSignal) mValidateSignal = memClaim(new enable_signal_t());
return mValidateSignal->connect(cb);
}
boost::signals2::connection LLUICtrl::setMouseEnterCallback( const commit_signal_t::slot_type& cb )
{
- if (!mMouseEnterSignal) mMouseEnterSignal = new commit_signal_t();
+ if (!mMouseEnterSignal) mMouseEnterSignal = memClaim(new commit_signal_t());
return mMouseEnterSignal->connect(cb);
}
boost::signals2::connection LLUICtrl::setMouseLeaveCallback( const commit_signal_t::slot_type& cb )
{
- if (!mMouseLeaveSignal) mMouseLeaveSignal = new commit_signal_t();
+ if (!mMouseLeaveSignal) mMouseLeaveSignal = memClaim(new commit_signal_t());
return mMouseLeaveSignal->connect(cb);
}
boost::signals2::connection LLUICtrl::setMouseDownCallback( const mouse_signal_t::slot_type& cb )
{
- if (!mMouseDownSignal) mMouseDownSignal = new mouse_signal_t();
+ if (!mMouseDownSignal) mMouseDownSignal = memClaim(new mouse_signal_t());
return mMouseDownSignal->connect(cb);
}
boost::signals2::connection LLUICtrl::setMouseUpCallback( const mouse_signal_t::slot_type& cb )
{
- if (!mMouseUpSignal) mMouseUpSignal = new mouse_signal_t();
+ if (!mMouseUpSignal) mMouseUpSignal = memClaim(new mouse_signal_t());
return mMouseUpSignal->connect(cb);
}
boost::signals2::connection LLUICtrl::setRightMouseDownCallback( const mouse_signal_t::slot_type& cb )
{
- if (!mRightMouseDownSignal) mRightMouseDownSignal = new mouse_signal_t();
+ if (!mRightMouseDownSignal) mRightMouseDownSignal = memClaim(new mouse_signal_t());
return mRightMouseDownSignal->connect(cb);
}
boost::signals2::connection LLUICtrl::setRightMouseUpCallback( const mouse_signal_t::slot_type& cb )
{
- if (!mRightMouseUpSignal) mRightMouseUpSignal = new mouse_signal_t();
+ if (!mRightMouseUpSignal) mRightMouseUpSignal = memClaim(new mouse_signal_t());
return mRightMouseUpSignal->connect(cb);
}
boost::signals2::connection LLUICtrl::setDoubleClickCallback( const mouse_signal_t::slot_type& cb )
{
- if (!mDoubleClickSignal) mDoubleClickSignal = new mouse_signal_t();
+ if (!mDoubleClickSignal) mDoubleClickSignal = memClaim(new mouse_signal_t());
return mDoubleClickSignal->connect(cb);
}