summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelpick.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-01-20 13:54:34 -0800
committerTofu Linden <tofu.linden@lindenlab.com>2010-01-20 13:54:34 -0800
commita65188d85f75e848d224bd335a00ed8aa51f945e (patch)
treef43b390cba45d047fc0fa31659f6969f62b925d1 /indra/newview/llpanelpick.cpp
parent1a8008ea150d1eb9a8f4036988ef971fb1901cb3 (diff)
parent5ca943cd0279d35ffdf584fa0de3b795645f276c (diff)
Merge from viewer2. Minor conflict resolved.
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);
}