diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2024-11-14 19:33:24 +0200 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2025-03-05 15:16:14 +0200 |
commit | 559ce54d50ffffd9605be124e41d15acaf72c736 (patch) | |
tree | 9f8a2e867dc241b081fb0fd04c058eb00f290e30 | |
parent | 2ea170ca5a199cdd57f0ce7821e5cf9e6aebddc1 (diff) |
#3072 don't update UI on cancel event from texture picker
-rw-r--r-- | indra/newview/llfloaterregioninfo.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llfloaterregioninfo.h | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 3239921259..334f32d051 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -851,6 +851,13 @@ void LLPanelRegionInfo::initCtrl(const std::string& name) getChild<LLUICtrl>(name)->setCommitCallback(boost::bind(&LLPanelRegionInfo::onChangeAnything, this)); } +void LLPanelRegionInfo::initAndSetTexCtrl(LLTextureCtrl*& ctrl, const std::string& name) +{ + ctrl = findChild<LLTextureCtrl>(name); + if (ctrl) + ctrl->setOnSelectCallback([this](LLUICtrl* ctrl, const LLSD& param){ onChangeAnything(); }); +} + template<typename CTRL> void LLPanelRegionInfo::initAndSetCtrl(CTRL*& ctrl, const std::string& name) { @@ -1580,7 +1587,7 @@ bool LLPanelRegionTerrainInfo::postBuild() for(S32 i = 0; i < LLTerrainMaterials::ASSET_COUNT; ++i) { - initAndSetCtrl(mTextureDetailCtrl[i], llformat("texture_detail_%d", i)); + initAndSetTexCtrl(mTextureDetailCtrl[i], llformat("texture_detail_%d", i)); if (mTextureDetailCtrl[i]) { mTextureDetailCtrl[i]->setBakeTextureEnabled(false); diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h index 201d8b0a68..a8631c36ca 100644 --- a/indra/newview/llfloaterregioninfo.h +++ b/indra/newview/llfloaterregioninfo.h @@ -159,6 +159,7 @@ public: protected: void initCtrl(const std::string& name); template<typename CTRL> void initAndSetCtrl(CTRL*& ctrl, const std::string& name); + void initAndSetTexCtrl(LLTextureCtrl*& ctrl, const std::string& name); // Returns true if update sent and apply button should be // disabled. |