summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelprofileclassifieds.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelprofileclassifieds.cpp')
-rw-r--r--indra/newview/llpanelprofileclassifieds.cpp18
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);