summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturectrl.cpp
diff options
context:
space:
mode:
authorCallum Prentice <callum@lindenlab.com>2010-01-20 15:30:07 -0800
committerCallum Prentice <callum@lindenlab.com>2010-01-20 15:30:07 -0800
commit8aadfb1cb63a9527835c6c5127d041d924455505 (patch)
tree3fd5f231cae133ec25f0d0d4bf9eda53d0d4c0e4 /indra/newview/lltexturectrl.cpp
parent622f8b59ceb286f955351b6185a98919f03ed136 (diff)
parent20af2d325a4340aca997efbea752849e9f15d041 (diff)
Merge with tip
Diffstat (limited to 'indra/newview/lltexturectrl.cpp')
-rw-r--r--indra/newview/lltexturectrl.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index b980f65e68..9c4825763b 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -878,6 +878,7 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p)
{
setAllowNoTexture(p.allow_no_texture);
setCanApplyImmediately(p.can_apply_immediately);
+ mCommitOnSelection = !p.no_commit_on_selection;
LLTextBox::Params params(p.caption_text);
params.name(p.label);
@@ -1122,7 +1123,11 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op)
}
else
{
- onCommit();
+ // If the "no_commit_on_selection" parameter is set
+ // we commit only when user presses OK in the picker
+ // (i.e. op == TEXTURE_SELECT) or changes texture via DnD.
+ if (mCommitOnSelection || op == TEXTURE_SELECT)
+ onCommit();
}
}
}