diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llfloatermyenvironment.cpp | 20 | ||||
| -rw-r--r-- | indra/newview/llfloatermyenvironment.h | 2 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/menu_settings_gear.xml | 3 | 
3 files changed, 15 insertions, 10 deletions
diff --git a/indra/newview/llfloatermyenvironment.cpp b/indra/newview/llfloatermyenvironment.cpp index 21d106c8b1..e916777eb2 100644 --- a/indra/newview/llfloatermyenvironment.cpp +++ b/indra/newview/llfloatermyenvironment.cpp @@ -318,13 +318,13 @@ bool LLFloaterMyEnvironment::canAction(const std::string &context)      if (context == PARAMETER_EDIT)      {  -        return (selected.size() == 1) && isSettingSelected(selected.front()); +        return (selected.size() == 1) && isSettingId(selected.front());      }      else if (context == PARAMETER_COPY)      {          for (std::vector<LLUUID>::iterator it = selected.begin(); it != selected.end(); it++)          { -            if(!isSettingSelected(*it)) +            if(!isSettingId(*it))              {                  return false;              } @@ -340,7 +340,7 @@ bool LLFloaterMyEnvironment::canAction(const std::string &context)          LLClipboard::instance().pasteFromClipboard(ids);          for (std::vector<LLUUID>::iterator it = ids.begin(); it != ids.end(); it++)          { -            if (!isSettingSelected(*it)) +            if (!isSettingId(*it))              {                  return false;              } @@ -349,7 +349,7 @@ bool LLFloaterMyEnvironment::canAction(const std::string &context)      }      else if (context == PARAMETER_COPYUUID)      { -        return (selected.size() == 1) && isSettingSelected(selected.front()); +        return (selected.size() == 1) && isSettingId(selected.front());      }      return false; @@ -365,16 +365,18 @@ bool LLFloaterMyEnvironment::canApply(const std::string &context)      if (context == PARAMETER_REGION)      {  -        return LLEnvironment::instance().canAgentUpdateRegionEnvironment(); +        return isSettingId(selected.front()) && LLEnvironment::instance().canAgentUpdateRegionEnvironment();      }      else if (context == PARAMETER_PARCEL)      {  -        return LLEnvironment::instance().canAgentUpdateParcelEnvironment(); +        return isSettingId(selected.front()) && LLEnvironment::instance().canAgentUpdateParcelEnvironment();      } -    else +    else if (context == PARAMETER_LOCAL)      { -        return (context == PARAMETER_LOCAL); +        return isSettingId(selected.front());      } + +    return false;  }  //------------------------------------------------------------------------- @@ -436,7 +438,7 @@ LLUUID LLFloaterMyEnvironment::findItemByAssetId(LLUUID asset_id, bool copyable_      return LLUUID::null;  } -bool LLFloaterMyEnvironment::isSettingSelected(LLUUID item_id) +bool LLFloaterMyEnvironment::isSettingId(const LLUUID& item_id)  {      LLInventoryItem* itemp = gInventory.getItem(item_id); diff --git a/indra/newview/llfloatermyenvironment.h b/indra/newview/llfloatermyenvironment.h index fea0981590..2d6e234700 100644 --- a/indra/newview/llfloatermyenvironment.h +++ b/indra/newview/llfloatermyenvironment.h @@ -69,7 +69,7 @@ private:      void                            getSelectedIds(uuid_vec_t& ids) const;      void                            refreshButtonStates(); -    bool                            isSettingSelected(LLUUID item_id); +    static bool                     isSettingId(const LLUUID &item_id);      static LLUUID                   findItemByAssetId(LLUUID asset_id, bool copyable_only, bool ignore_library);  }; diff --git a/indra/newview/skins/default/xui/en/menu_settings_gear.xml b/indra/newview/skins/default/xui/en/menu_settings_gear.xml index 57f4aa8655..96cbac4478 100644 --- a/indra/newview/skins/default/xui/en/menu_settings_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_settings_gear.xml @@ -24,6 +24,9 @@          <menu_item_call.on_click                   function="MyEnvironments.DoApply"                  parameter="local" /> +      <menu_item_call.on_enable +              function="MyEnvironments.CanApply" +              parameter="local"/>      </menu_item_call>      <menu_item_call              name="Settings Apply Parcel"  | 
