File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -832,6 +832,13 @@ void LLPanelRegionInfo::initCtrl(const std::string& name)
832
832
getChild<LLUICtrl>(name)->setCommitCallback (boost::bind (&LLPanelRegionInfo::onChangeAnything, this ));
833
833
}
834
834
835
+ void LLPanelRegionInfo::initAndSetTexCtrl (LLTextureCtrl*& ctrl, const std::string& name)
836
+ {
837
+ ctrl = findChild<LLTextureCtrl>(name);
838
+ if (ctrl)
839
+ ctrl->setOnSelectCallback ([this ](LLUICtrl* ctrl, const LLSD& param){ onChangeAnything (); });
840
+ }
841
+
835
842
template <typename CTRL>
836
843
void LLPanelRegionInfo::initAndSetCtrl (CTRL*& ctrl, const std::string& name)
837
844
{
@@ -1564,7 +1571,7 @@ bool LLPanelRegionTerrainInfo::postBuild()
1564
1571
1565
1572
for (S32 i = 0 ; i < LLTerrainMaterials::ASSET_COUNT; ++i)
1566
1573
{
1567
- initAndSetCtrl (mTextureDetailCtrl [i], llformat (" texture_detail_%d" , i));
1574
+ initAndSetTexCtrl (mTextureDetailCtrl [i], llformat (" texture_detail_%d" , i));
1568
1575
if (mTextureDetailCtrl [i])
1569
1576
{
1570
1577
mTextureDetailCtrl [i]->setBakeTextureEnabled (false );
Original file line number Diff line number Diff line change @@ -167,6 +167,7 @@ class LLPanelRegionInfo : public LLPanel
167
167
protected:
168
168
void initCtrl (const std::string& name);
169
169
template <typename CTRL> void initAndSetCtrl (CTRL*& ctrl, const std::string& name);
170
+ void initAndSetTexCtrl (LLTextureCtrl*& ctrl, const std::string& name);
170
171
171
172
// Returns true if update sent and apply button should be
172
173
// disabled.
You can’t perform that action at this time.
0 commit comments