summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelpick.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelpick.cpp')
-rw-r--r--indra/newview/llpanelpick.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/indra/newview/llpanelpick.cpp b/indra/newview/llpanelpick.cpp
index e7615929c8..5ac0587550 100644
--- a/indra/newview/llpanelpick.cpp
+++ b/indra/newview/llpanelpick.cpp
@@ -448,7 +448,7 @@ BOOL LLPanelPickEdit::postBuild()
{
LLPanelPickInfo::postBuild();
- mSnapshotCtrl->setOnSelectCallback(boost::bind(&LLPanelPickEdit::onPickChanged, this, _1));
+ mSnapshotCtrl->setCommitCallback(boost::bind(&LLPanelPickEdit::onSnapshotChanged, this));
LLLineEditor* line_edit = getChild<LLLineEditor>("pick_name");
line_edit->setKeystrokeCallback(boost::bind(&LLPanelPickEdit::onPickChanged, this, _1), NULL);
@@ -537,16 +537,14 @@ void LLPanelPickEdit::sendUpdate()
}
}
+void LLPanelPickEdit::onSnapshotChanged()
+{
+ enableSaveButton(true);
+}
+
void LLPanelPickEdit::onPickChanged(LLUICtrl* ctrl)
{
- if(isDirty())
- {
- enableSaveButton(true);
- }
- else
- {
- enableSaveButton(false);
- }
+ enableSaveButton(isDirty());
}
void LLPanelPickEdit::resetData()
@@ -613,10 +611,6 @@ void LLPanelPickEdit::initTexturePickerMouseEvents()
mSnapshotCtrl->setMouseEnterCallback(boost::bind(&LLPanelPickEdit::onTexturePickerMouseEnter, this, _1));
mSnapshotCtrl->setMouseLeaveCallback(boost::bind(&LLPanelPickEdit::onTexturePickerMouseLeave, this, _1));
- // *WORKAROUND: Needed for EXT-1625: enabling save button each time when picker is opened, even if
- // texture wasn't changed (see Steve's comment).
- mSnapshotCtrl->setMouseDownCallback(boost::bind(&LLPanelPickEdit::enableSaveButton, this, true));
-
text_icon->setVisible(FALSE);
}