summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturectrl.cpp
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-01-20 19:49:41 +0200
committerVadim Savchuk <vsavchuk@productengine.com>2010-01-20 19:49:41 +0200
commit8758fac7124ff07f2a003bf5719c19a4dab170b9 (patch)
tree102c57c6855dca1f107abfa2febf77b8441595c4 /indra/newview/lltexturectrl.cpp
parentda00631c638acbf3d3b6ecbe5edb5abecf03252c (diff)
Fixed bug EXT-4369 ([BSI] Changing image in "Pick" doesn't trigger "Save Pick" button to be active)
* Changed the Save button to react on texture picker commit, not on selection. * Added an optional "no_commit_on_selection" parameter to LLTextureCtrl to commit only when user presses the OK button in the picker or changes the texture via DnD, i.e. browsing in the picker doesn't commit. --HG-- branch : product-engine
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();
}
}
}