diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-01-21 09:55:17 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-01-21 09:55:17 -0500 |
commit | 4277d6b576836bd722d5100b709ebf923640109e (patch) | |
tree | 9f738d428077f0b94786cc422af8b426c4ba2bcd /indra/newview/lltexturectrl.cpp | |
parent | 83670fc520cf8f4f78446f853cae584c2970f4fc (diff) | |
parent | 1a927f38d2266220f4000f35f64328476f9ffde6 (diff) |
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(); } } } |