diff options
author | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2010-03-05 17:23:41 +0200 |
---|---|---|
committer | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2010-03-05 17:23:41 +0200 |
commit | 698835061bb3e4113eb6af688e05517fc50cc090 (patch) | |
tree | 049aecd2efbf0e74bf4ecf90042b5cfb00f01dea /indra/newview | |
parent | a8e1c2ed134b88b55b713ac53cd63cab4bb526b3 (diff) |
Update for major bug EXT-5943 - Classifieds are Published and charged as soon as you hit Save.
Fixed category mismatch after editing classified.
Made price uneditable in edit mode because it looks like server does not support price update(same in viewer 1.23)
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llpanelclassified.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index c4684e9827..9f24ddc799 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -1696,7 +1696,8 @@ void LLPanelClassifiedEdit::processProperties(void* data, EAvatarProcessorType t setPosGlobal(c_info->pos_global); setClassifiedLocation(createLocationText(c_info->parcel_name, c_info->sim_name, c_info->pos_global)); - getChild<LLComboBox>("category")->setCurrentByIndex(c_info->category + 1); + // *HACK see LLPanelClassifiedEdit::sendUpdate() + getChild<LLComboBox>("category")->setCurrentByIndex(c_info->category - 1); getChild<LLComboBox>("category")->resetDirty(); bool mature = is_cf_mature(c_info->flags); @@ -1705,6 +1706,7 @@ void LLPanelClassifiedEdit::processProperties(void* data, EAvatarProcessorType t getChild<LLComboBox>("content_type")->setCurrentByIndex(mature ? CB_ITEM_MATURE : CB_ITEM_PG); childSetValue("auto_renew", auto_renew); childSetValue("price_for_listing", c_info->price_for_listing); + childSetEnabled("price_for_listing", isNew()); resetDirty(); setInfoLoaded(true); @@ -1763,6 +1765,7 @@ void LLPanelClassifiedEdit::resetControls() getChild<LLComboBox>("content_type")->setCurrentByIndex(0); childSetValue("auto_renew", false); childSetValue("price_for_listing", MINIMUM_PRICE_FOR_LISTING); + childSetEnabled("price_for_listing", TRUE); } bool LLPanelClassifiedEdit::canClose() @@ -1799,7 +1802,9 @@ void LLPanelClassifiedEdit::sendUpdate() c_data.agent_id = gAgent.getID(); c_data.classified_id = getClassifiedId(); - c_data.category = getCategory(); + // *HACK + // Categories on server start with 1 while combo-box index starts with 0 + c_data.category = getCategory() + 1; c_data.name = getClassifiedName(); c_data.description = getDescription(); c_data.parcel_id = getParcelId(); @@ -1814,7 +1819,7 @@ void LLPanelClassifiedEdit::sendUpdate() U32 LLPanelClassifiedEdit::getCategory() { LLComboBox* cat_cb = getChild<LLComboBox>("category"); - return cat_cb->getCurrentIndex() + 1; + return cat_cb->getCurrentIndex(); } U8 LLPanelClassifiedEdit::getFlags() |