summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llpanellandmarks.cpp6
-rw-r--r--indra/newview/llpanelplaces.cpp3
-rw-r--r--indra/newview/llpanelplacestab.cpp1
-rw-r--r--indra/newview/llpanelplacestab.h3
-rw-r--r--indra/newview/llpanelteleporthistory.cpp4
5 files changed, 15 insertions, 2 deletions
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 769b060d93..e698a61fef 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -285,6 +285,10 @@ LLToggleableMenu* LLLandmarksPanel::getCreateMenu()
void LLLandmarksPanel::updateVerbs()
{
+ if (sRemoveBtn)
+ {
+ sRemoveBtn->setEnabled(isActionEnabled("delete") && (isFolderSelected() || isLandmarkSelected()));
+ }
}
void LLLandmarksPanel::setItemSelected(const LLUUID& obj_id, BOOL take_keyboard_focus)
@@ -425,6 +429,7 @@ void LLLandmarksPanel::initLandmarksPanel(LLPlacesInventoryPanel* inventory_list
{
inventory_list->getFilter().setEmptyLookupMessage("PlacesNoMatchingItems");
inventory_list->setFilterTypes(0x1 << LLInventoryType::IT_LANDMARK);
+ inventory_list->setSelectCallback(boost::bind(&LLLandmarksPanel::updateVerbs, this));
inventory_list->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
bool sorting_order = gSavedSettings.getBOOL("LandmarksSortedByDate");
@@ -1032,6 +1037,7 @@ bool LLLandmarksPanel::handleDragAndDropToTrash(BOOL drop, EDragAndDropType carg
break;
}
+ updateVerbs();
return true;
}
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index ac7bc0fc32..1713370692 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -1229,6 +1229,9 @@ void LLPanelPlaces::createTabs()
// favorites and inventory can remove items, history can clear history
childSetVisible("trash_btn_panel", TRUE);
+
+ mActivePanel->setRemoveBtn(mRemoveSelectedBtn);
+ mActivePanel->updateVerbs();
}
mTabsCreated = true;
diff --git a/indra/newview/llpanelplacestab.cpp b/indra/newview/llpanelplacestab.cpp
index 9601ac54a4..748a917147 100644
--- a/indra/newview/llpanelplacestab.cpp
+++ b/indra/newview/llpanelplacestab.cpp
@@ -38,6 +38,7 @@
#include "llworldmap.h"
std::string LLPanelPlacesTab::sFilterSubString = LLStringUtil::null;
+LLButton* LLPanelPlacesTab::sRemoveBtn = NULL;
bool LLPanelPlacesTab::isTabVisible()
{
diff --git a/indra/newview/llpanelplacestab.h b/indra/newview/llpanelplacestab.h
index 886f4ce9c0..aab1c130c1 100644
--- a/indra/newview/llpanelplacestab.h
+++ b/indra/newview/llpanelplacestab.h
@@ -67,9 +67,12 @@ public:
const std::string& getFilterSubString() { return sFilterSubString; }
void setFilterSubString(const std::string& string) { sFilterSubString = string; }
+ void setRemoveBtn(LLButton* trash_btn) { sRemoveBtn = trash_btn; }
+
protected:
// Search string for filtering landmarks and teleport history locations
static std::string sFilterSubString;
+ static LLButton* sRemoveBtn;
};
#endif //LL_LLPANELPLACESTAB_H
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index 7a3d3525ac..b938b30479 100644
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -570,9 +570,9 @@ void LLTeleportHistoryPanel::updateVerbs()
if (!isTabVisible())
return;
- if (!mLastSelectedFlatlList)
+ if (sRemoveBtn)
{
- return;
+ sRemoveBtn->setEnabled(true);
}
}