diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llinventorybridge.cpp | 52 |
1 files changed, 12 insertions, 40 deletions
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp index eb2170a..6e6b39c 100644 --- a/linden/indra/newview/llinventorybridge.cpp +++ b/linden/indra/newview/llinventorybridge.cpp | |||
@@ -1439,7 +1439,6 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, | |||
1439 | if(drop && accept) | 1439 | if(drop && accept) |
1440 | { | 1440 | { |
1441 | it = inventory_objects.begin(); | 1441 | it = inventory_objects.begin(); |
1442 | InventoryObjectList::iterator first_it = inventory_objects.begin(); | ||
1443 | LLMoveInv* move_inv = new LLMoveInv; | 1442 | LLMoveInv* move_inv = new LLMoveInv; |
1444 | move_inv->mObjectID = object_id; | 1443 | move_inv->mObjectID = object_id; |
1445 | move_inv->mCategoryID = category_id; | 1444 | move_inv->mCategoryID = category_id; |
@@ -1922,24 +1921,11 @@ void LLFolderBridge::pasteFromClipboard() | |||
1922 | item = model->getItem(objects.get(i)); | 1921 | item = model->getItem(objects.get(i)); |
1923 | if (item) | 1922 | if (item) |
1924 | { | 1923 | { |
1925 | copy_inventory_item( | 1924 | LLInvFVBridge::changeItemParent( |
1926 | gAgent.getID(), | 1925 | model, |
1927 | item->getPermissions().getOwner(), | 1926 | (LLViewerInventoryItem*)item, |
1928 | item->getUUID(), | 1927 | mUUID, |
1929 | parent_id, | 1928 | FALSE); |
1930 | std::string(), | ||
1931 | LLPointer<LLInventoryCallback>(NULL)); | ||
1932 | LLInventoryCategory* cat = model->getCategory(item->getUUID()); | ||
1933 | if(cat) | ||
1934 | { | ||
1935 | model->purgeDescendentsOf(mUUID); | ||
1936 | } | ||
1937 | LLInventoryObject* obj = model->getObject(item->getUUID()); | ||
1938 | if(!obj) return; | ||
1939 | obj->removeFromServer(); | ||
1940 | LLPreview::hide(item->getUUID()); | ||
1941 | model->deleteObject(item->getUUID()); | ||
1942 | model->notifyObservers(); | ||
1943 | } | 1929 | } |
1944 | } | 1930 | } |
1945 | } | 1931 | } |
@@ -3123,11 +3109,11 @@ void LLNotecardBridge::openItem() | |||
3123 | LLViewerInventoryItem* item = getItem(); | 3109 | LLViewerInventoryItem* item = getItem(); |
3124 | if (item) | 3110 | if (item) |
3125 | { | 3111 | { |
3126 | if(isSkySetting()) | 3112 | if(LLWLParamManager::isSkySettingsNotecard(getName())) |
3127 | { | 3113 | { |
3128 | LLWLParamManager::instance()->loadPresetNotecard(item->getName(), item->getAssetUUID(), mUUID); | 3114 | LLWLParamManager::instance()->loadPresetNotecard(item->getName(), item->getAssetUUID(), mUUID); |
3129 | } | 3115 | } |
3130 | else if(isWaterSetting()) | 3116 | else if(LLWLParamManager::isWaterSettingsNotecard(getName())) |
3131 | { | 3117 | { |
3132 | LLWaterParamManager::instance()->loadPresetNotecard(item->getName(), item->getAssetUUID(), mUUID); | 3118 | LLWaterParamManager::instance()->loadPresetNotecard(item->getName(), item->getAssetUUID(), mUUID); |
3133 | } | 3119 | } |
@@ -3158,13 +3144,13 @@ void LLNotecardBridge::buildContextMenu(LLMenuGL& menu, U32 flags) | |||
3158 | else | 3144 | else |
3159 | { | 3145 | { |
3160 | 3146 | ||
3161 | if(isWindLight()) | 3147 | if(LLWLParamManager::isSettingsNotecard(getName())) |
3162 | { | 3148 | { |
3163 | if(isSkySetting()) | 3149 | if(LLWLParamManager::isSkySettingsNotecard(getName())) |
3164 | { | 3150 | { |
3165 | items.push_back(std::string("Use WindLight Settings")); | 3151 | items.push_back(std::string("Use WindLight Settings")); |
3166 | } | 3152 | } |
3167 | else if(isWaterSetting()) | 3153 | else if(LLWLParamManager::isWaterSettingsNotecard(getName())) |
3168 | { | 3154 | { |
3169 | items.push_back(std::string("Use WaterLight Settings")); | 3155 | items.push_back(std::string("Use WaterLight Settings")); |
3170 | } | 3156 | } |
@@ -3221,11 +3207,11 @@ void LLNotecardBridge::performAction(LLFolderView* folder, LLInventoryModel* mod | |||
3221 | 3207 | ||
3222 | LLUIImagePtr LLNotecardBridge::getIcon() const | 3208 | LLUIImagePtr LLNotecardBridge::getIcon() const |
3223 | { | 3209 | { |
3224 | if(isSkySetting()) | 3210 | if(LLWLParamManager::isSkySettingsNotecard(getName())) |
3225 | { | 3211 | { |
3226 | return LLUI::getUIImage("Inv_WindLight"); | 3212 | return LLUI::getUIImage("Inv_WindLight"); |
3227 | } | 3213 | } |
3228 | else if(isWaterSetting()) | 3214 | else if(LLWLParamManager::isWaterSettingsNotecard(getName())) |
3229 | { | 3215 | { |
3230 | return LLUI::getUIImage("Inv_WaterLight"); | 3216 | return LLUI::getUIImage("Inv_WaterLight"); |
3231 | } | 3217 | } |
@@ -3235,20 +3221,6 @@ LLUIImagePtr LLNotecardBridge::getIcon() const | |||
3235 | } | 3221 | } |
3236 | } | 3222 | } |
3237 | 3223 | ||
3238 | bool LLNotecardBridge::isSkySetting() const | ||
3239 | { | ||
3240 | return (getName().length() > 2 && getName().compare(getName().length() - 3, 3, ".wl") == 0); | ||
3241 | } | ||
3242 | |||
3243 | bool LLNotecardBridge::isWaterSetting() const | ||
3244 | { | ||
3245 | return (getName().length() > 2 && getName().compare(getName().length() - 3, 3, ".ww") == 0); | ||
3246 | } | ||
3247 | |||
3248 | bool LLNotecardBridge::isWindLight() const | ||
3249 | { | ||
3250 | return (isSkySetting() || isWaterSetting()); | ||
3251 | } | ||
3252 | 3224 | ||
3253 | // +=================================================+ | 3225 | // +=================================================+ |
3254 | // | LLGestureBridge | | 3226 | // | LLGestureBridge | |