diff options
author | Denis Serdjuk <dserduk@productengine.com> | 2009-10-23 23:28:04 +0300 |
---|---|---|
committer | Denis Serdjuk <dserduk@productengine.com> | 2009-10-23 23:28:04 +0300 |
commit | d0d9d4a9b0bd61e9be98e1e20719b79a9fa58970 (patch) | |
tree | 8af17beb47ee4fde9c6e3d9dd9a4949d326eefbf /indra | |
parent | c8485374dd1d3e0340d7821915f490c636f1b28c (diff) |
fixed normal bug EXT-1630 Edit Landmark: Current landmark place should be selected by default in the \"Place Landmark In\" picklist
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpanelplaceinfo.cpp | 15 | ||||
-rw-r--r-- | indra/newview/llpanelplaceinfo.h | 3 | ||||
-rw-r--r-- | indra/newview/llpanelplaces.cpp | 11 |
3 files changed, 20 insertions, 9 deletions
diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index cb9f7184f0..2edb2bba06 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -76,7 +76,6 @@ typedef std::pair<LLUUID, std::string> folder_pair_t; static bool cmp_folders(const folder_pair_t& left, const folder_pair_t& right); -static std::string getFullFolderName(const LLViewerInventoryCategory* cat); static void collectLandmarkFolders(LLInventoryModel::cat_array_t& cats); static LLRegisterPanelClassWrapper<LLPanelPlaceInfo> t_place_info("panel_place_info"); @@ -1028,14 +1027,9 @@ void LLPanelPlaceInfo::onForSaleBannerClick() } - -static bool cmp_folders(const folder_pair_t& left, const folder_pair_t& right) -{ - return left.second < right.second; -} - -static std::string getFullFolderName(const LLViewerInventoryCategory* cat) +/*static*/ +std::string LLPanelPlaceInfo::getFullFolderName(const LLViewerInventoryCategory* cat) { std::string name = cat->getName(); LLUUID parent_id; @@ -1057,6 +1051,11 @@ static std::string getFullFolderName(const LLViewerInventoryCategory* cat) return name; } +static bool cmp_folders(const folder_pair_t& left, const folder_pair_t& right) +{ + return left.second < right.second; +} + static void collectLandmarkFolders(LLInventoryModel::cat_array_t& cats) { LLUUID landmarks_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK); diff --git a/indra/newview/llpanelplaceinfo.h b/indra/newview/llpanelplaceinfo.h index 7b3a8f050b..aa2485cbb4 100644 --- a/indra/newview/llpanelplaceinfo.h +++ b/indra/newview/llpanelplaceinfo.h @@ -52,6 +52,7 @@ class LLTextBox; class LLTextEditor; class LLTextureCtrl; class LLViewerRegion; +class LLViewerInventoryCategory; class LLPanelPlaceInfo : public LLPanel, LLRemoteParcelInfoObserver { @@ -131,6 +132,8 @@ public: /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data); /*virtual*/ void handleVisibilityChange (BOOL new_visibility); + + static std::string getFullFolderName(const LLViewerInventoryCategory* cat); private: diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 5ab823b6e5..b2e9110e96 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -351,7 +351,16 @@ void LLPanelPlaces::setItem(LLInventoryItem* item) if (is_landmark_editable) { - mPlaceInfo->setLandmarkFolder(mItem->getParentUUID()); + if(!mPlaceInfo->setLandmarkFolder(mItem->getParentUUID()) && !mItem->getParentUUID().isNull()) + { + const LLViewerInventoryCategory* cat = gInventory.getCategory(mItem->getParentUUID()); + if(cat) + { + std::string cat_fullname = LLPanelPlaceInfo::getFullFolderName(cat); + LLComboBox* folderList = mPlaceInfo->getChild<LLComboBox>("folder_combo"); + folderList->add(cat_fullname, cat->getUUID(),ADD_TOP); + } + } } mPlaceInfo->displayItemInfo(mItem); |