Skip to content

Commit 092ee73

Browse files
#3072 don't update UI on cancel event from texture picker
1 parent e3f8dfe commit 092ee73

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

indra/newview/llfloaterregioninfo.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,13 @@ void LLPanelRegionInfo::initCtrl(const std::string& name)
832832
getChild<LLUICtrl>(name)->setCommitCallback(boost::bind(&LLPanelRegionInfo::onChangeAnything, this));
833833
}
834834

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+
835842
template<typename CTRL>
836843
void LLPanelRegionInfo::initAndSetCtrl(CTRL*& ctrl, const std::string& name)
837844
{
@@ -1564,7 +1571,7 @@ bool LLPanelRegionTerrainInfo::postBuild()
15641571

15651572
for(S32 i = 0; i < LLTerrainMaterials::ASSET_COUNT; ++i)
15661573
{
1567-
initAndSetCtrl(mTextureDetailCtrl[i], llformat("texture_detail_%d", i));
1574+
initAndSetTexCtrl(mTextureDetailCtrl[i], llformat("texture_detail_%d", i));
15681575
if (mTextureDetailCtrl[i])
15691576
{
15701577
mTextureDetailCtrl[i]->setBakeTextureEnabled(false);

indra/newview/llfloaterregioninfo.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ class LLPanelRegionInfo : public LLPanel
167167
protected:
168168
void initCtrl(const std::string& name);
169169
template<typename CTRL> void initAndSetCtrl(CTRL*& ctrl, const std::string& name);
170+
void initAndSetTexCtrl(LLTextureCtrl*& ctrl, const std::string& name);
170171

171172
// Returns true if update sent and apply button should be
172173
// disabled.

0 commit comments

Comments
 (0)