diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-01-20 19:49:41 +0200 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-01-20 19:49:41 +0200 |
commit | 8758fac7124ff07f2a003bf5719c19a4dab170b9 (patch) | |
tree | 102c57c6855dca1f107abfa2febf77b8441595c4 /indra/newview/llpanelpick.cpp | |
parent | da00631c638acbf3d3b6ecbe5edb5abecf03252c (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/llpanelpick.cpp')
-rw-r--r-- | indra/newview/llpanelpick.cpp | 20 |
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); } |