diff options
-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() |