diff options
| author | Loren Shih <seraph@lindenlab.com> | 2010-01-20 15:59:05 -0500 |
|---|---|---|
| committer | Loren Shih <seraph@lindenlab.com> | 2010-01-20 15:59:05 -0500 |
| commit | fd5ee757a5c9bb014fd021139e8b701a6007c9d0 (patch) | |
| tree | b74be57b620d59a57abf7693eed56debd769b766 /indra/newview/lltexturectrl.cpp | |
| parent | 362f288bc6c08f5f345b0b676ca5e3e1fae53c07 (diff) | |
| parent | 5ca943cd0279d35ffdf584fa0de3b795645f276c (diff) | |
viewer2.0->viewer2.0 merge
Diffstat (limited to 'indra/newview/lltexturectrl.cpp')
| -rw-r--r-- | indra/newview/lltexturectrl.cpp | 7 |
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(); } } } |
