diff options
| -rw-r--r-- | indra/newview/llinventorybridge.cpp | 24 | ||||
| -rw-r--r-- | indra/newview/llinventorybridge.h | 1 | 
2 files changed, 17 insertions, 8 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 52031b0a31..331754d009 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4555,6 +4555,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t&   items                  items.push_back(std::string("Rename"));                  items.push_back(std::string("thumbnail")); +                addInventoryFavoritesMenuOptions(items);                  addDeleteContextMenuOptions(items, disabled_items);                  // EXT-4030: disallow deletion of currently worn outfit                  const LLViewerInventoryItem* base_outfit_link = LLAppearanceMgr::instance().getBaseOutfitLink(); @@ -4572,6 +4573,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t&   items                  EMyOutfitsSubfolderType in_my_outfits = myoutfit_object_subfolder_type(model, mUUID, outfits_id);                  if (in_my_outfits != MY_OUTFITS_NO)                  { +                    // Either an outfit or a subfolder inside MY_OUTFITS                      if (in_my_outfits == MY_OUTFITS_SUBFOLDER)                      {                          // Not inside an outfit, but inside 'my outfits' @@ -4581,6 +4583,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t&   items                      items.push_back(std::string("Rename"));                      items.push_back(std::string("thumbnail")); +                    addInventoryFavoritesMenuOptions(items);                      addDeleteContextMenuOptions(items, disabled_items);                  }                  else @@ -4629,14 +4632,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t&   items          if (model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT) == mUUID)          {              items.push_back(std::string("Copy outfit list to clipboard")); -            if (isFavorite()) -            { -                items.push_back(std::string("Remove from Favorites")); -            } -            else -            { -                items.push_back(std::string("Add to Favorites")); -            } +            addInventoryFavoritesMenuOptions(items);              addOpenFolderMenuOptions(flags, items);          } @@ -4896,6 +4892,18 @@ void LLFolderBridge::addOpenFolderMenuOptions(U32 flags, menuentry_vec_t& items)      }  } +void LLFolderBridge::addInventoryFavoritesMenuOptions(menuentry_vec_t& items) +{ +    if (isFavorite()) +    { +        items.push_back(std::string("Remove from Favorites")); +    } +    else +    { +        items.push_back(std::string("Add to Favorites")); +    } +} +  bool LLFolderBridge::hasChildren() const  {      LLInventoryModel* model = getInventoryModel(); diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index ea80b6959a..d96adbd1d2 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -345,6 +345,7 @@ protected:      void buildContextMenuOptions(U32 flags, menuentry_vec_t& items,   menuentry_vec_t& disabled_items);      void buildContextMenuFolderOptions(U32 flags, menuentry_vec_t& items,   menuentry_vec_t& disabled_items);      void addOpenFolderMenuOptions(U32 flags, menuentry_vec_t& items); +    void addInventoryFavoritesMenuOptions(menuentry_vec_t& items); // Inventory favorites, not toolbar favorites      //--------------------------------------------------------------------      // Menu callbacks  | 
