summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lltexturectrl.cpp10
-rw-r--r--indra/newview/lltexturectrl.h3
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml1
3 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 9c4825763b..2b846d33fc 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -1103,7 +1103,10 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op)
{
if (op == TEXTURE_CANCEL)
mViewModel->resetDirty();
- else
+ // If the "no_commit_on_selection" parameter is set
+ // we get dirty only when user presses OK in the picker
+ // (i.e. op == TEXTURE_SELECT) or texture changes via DnD.
+ else if (mCommitOnSelection || op == TEXTURE_SELECT)
mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here?
if( floaterp->isDirty() )
@@ -1125,7 +1128,7 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op)
{
// 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.
+ // (i.e. op == TEXTURE_SELECT) or texture changes via DnD.
if (mCommitOnSelection || op == TEXTURE_SELECT)
onCommit();
}
@@ -1165,6 +1168,9 @@ BOOL LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask,
{
if(doDrop(item))
{
+ if (!mCommitOnSelection)
+ mViewModel->setDirty();
+
// This removes the 'Multiple' overlay, since
// there is now only one texture selected.
setTentative( FALSE );
diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h
index 023329a9b2..8ca92c3d87 100644
--- a/indra/newview/lltexturectrl.h
+++ b/indra/newview/lltexturectrl.h
@@ -74,7 +74,8 @@ public:
Optional<std::string> default_image_name;
Optional<bool> allow_no_texture;
Optional<bool> can_apply_immediately;
- Optional<bool> no_commit_on_selection; // don't commit unless it's DnD or OK button press
+ Optional<bool> no_commit_on_selection; // alternative mode: commit occurs and the widget gets dirty
+ // only on DnD or when OK is pressed in the picker
Optional<S32> label_width;
Optional<LLUIColor> border_color;
diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
index 673052c3b5..0893c204e7 100644
--- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
@@ -67,6 +67,7 @@ background_visible="true"
layout="topleft"
left="20"
name="insignia"
+ no_commit_on_selection="true"
tool_tip="Click to choose a picture"
top_pad="5"
width="100" />