diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2025-05-12 23:14:22 +0300 | 
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-05-13 15:20:44 +0300 | 
| commit | 6225eb8c86049a7ce52dbe092bb31afcbc679609 (patch) | |
| tree | 33806cee2ec06d67fecee4889223ef8af071bfa2 | |
| parent | e466414be4621906cb4c9cfc5f4a7216ba3670aa (diff) | |
#4060 Fix subfolders use through ctrl-v
| -rw-r--r-- | indra/newview/llinventorybridge.cpp | 37 | 
1 files changed, 19 insertions, 18 deletions
| diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index e48fe69853..279fb3ddf4 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4118,16 +4118,17 @@ void LLFolderBridge::perform_pasteFromClipboard()                  }                  if (move_is_into_outfit)                  { +                    bool handled = false;                      if (!move_is_into_my_outfits && item && can_move_to_outfit(item, move_is_into_current_outfit))                      {                          // todo: this is going to create dupplicate folders?                          dropToOutfit(item, move_is_into_current_outfit, cb); +                        handled = true;                      }                      else if (move_is_into_my_outfits && LLAssetType::AT_CATEGORY == obj->getType())                      {                          LLViewerInventoryCategory* cat = model->getCategory(item_id);                          U32 max_items_to_wear = gSavedSettings.getU32("WearFolderLimit"); -                        bool handled = false;                          if (cat && can_move_to_my_outfits_as_outfit(model, cat, max_items_to_wear))                          {                              if (mUUID == my_outifts_id) @@ -4135,10 +4136,10 @@ void LLFolderBridge::perform_pasteFromClipboard()                                  dropToMyOutfits(cat, cb);                                  handled = true;                              } -                            else if (move_is_into_my_outfits) +                            else                              { -                                EMyOutfitsSubfolderType res = myoutfit_object_subfolder_type(model, mUUID, my_outifts_id); -                                if (res == MY_OUTFITS_SUBFOLDER) +                                EMyOutfitsSubfolderType dest_res = myoutfit_object_subfolder_type(model, mUUID, my_outifts_id); +                                if (dest_res == MY_OUTFITS_SUBFOLDER)                                  {                                      // turn it into outfit                                      dropToMyOutfitsSubfolder(cat, mUUID, cb); @@ -4148,24 +4149,24 @@ void LLFolderBridge::perform_pasteFromClipboard()                          }                          if (!handled && cat && can_move_to_my_outfits_as_subfolder(model, cat))                          { -                            if (LLClipboard::instance().isCutMode()) -                            { -                                changeCategoryParent(model, cat, parent_id, false); -                            } -                            else +                            EMyOutfitsSubfolderType dest_res = myoutfit_object_subfolder_type(model, mUUID, my_outifts_id); +                            if (dest_res == MY_OUTFITS_SUBFOLDER || mUUID == my_outifts_id)                              { -                                copy_inventory_category(model, cat, parent_id); +                                if (LLClipboard::instance().isCutMode()) +                                { +                                    changeCategoryParent(model, cat, parent_id, false); +                                } +                                else +                                { +                                    copy_inventory_category(model, cat, parent_id); +                                } +                                if (cb) cb->fire(item_id); +                                handled = true;                              } -                            if (cb) cb->fire(item_id); -                            handled = true; -                        } - -                        if (!handled) -                        { -                            LLNotificationsUtil::add("MyOutfitsPasteFailed");                          }                      } -                    else + +                    if (!handled)                      {                          LLNotificationsUtil::add("MyOutfitsPasteFailed");                      } | 
