diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-03-19 19:45:00 +0200 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-03-19 19:45:00 +0200 |
commit | a8e92f27391460f7334f4378db8f68a223487f94 (patch) | |
tree | 349498a348c77d15eea23b9f3d83479f96bdf4f6 | |
parent | cf04305d04bb478fcee4ae75ce6377595d0ec4a8 (diff) |
SL-10731 [Legacy profiles] 'Cancel' does not discard changes at the Classified tab
-rw-r--r-- | indra/newview/llpanelprofileclassifieds.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/llpanelprofileclassifieds.cpp b/indra/newview/llpanelprofileclassifieds.cpp index 96853545d7..67fe17ed70 100644 --- a/indra/newview/llpanelprofileclassifieds.cpp +++ b/indra/newview/llpanelprofileclassifieds.cpp @@ -727,8 +727,22 @@ void LLPanelProfileClassified::onEditClick() void LLPanelProfileClassified::onCancelClick() { - // Reload data to undo changes to forms - LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(getClassifiedId()); + if (isNew()) + { + mClassifiedNameEdit->setValue(mClassifiedNameText->getValue()); + mClassifiedDescEdit->setValue(mClassifiedDescText->getValue()); + mLocationEdit->setValue(mLocationText->getValue()); + mCategoryCombo->setCurrentByIndex(0); + mContentTypeCombo->setCurrentByIndex(0); + mAutoRenewEdit->setValue(false); + mPriceEdit->setValue(MINIMUM_PRICE_FOR_LISTING); + mPriceEdit->setEnabled(TRUE); + } + else + { + // Reload data to undo changes to forms + LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(getClassifiedId()); + } setInfoLoaded(false); |