From a8e92f27391460f7334f4378db8f68a223487f94 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 19 Mar 2019 19:45:00 +0200 Subject: SL-10731 [Legacy profiles] 'Cancel' does not discard changes at the Classified tab --- indra/newview/llpanelprofileclassifieds.cpp | 18 ++++++++++++++++-- 1 file 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); -- cgit v1.2.3