summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelpick.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2010-01-21 09:55:17 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2010-01-21 09:55:17 -0500
commit4277d6b576836bd722d5100b709ebf923640109e (patch)
tree9f738d428077f0b94786cc422af8b426c4ba2bcd /indra/newview/llpanelpick.cpp
parent83670fc520cf8f4f78446f853cae584c2970f4fc (diff)
parent1a927f38d2266220f4000f35f64328476f9ffde6 (diff)
merge
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);
}