summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelteleporthistory.cpp
diff options
context:
space:
mode:
authorAndrew Polunin <apolunin@productengine.com>2010-05-11 11:34:36 +0300
committerAndrew Polunin <apolunin@productengine.com>2010-05-11 11:34:36 +0300
commitb46ba199fffbcbf70a42b28d2fa6b72d38d77771 (patch)
treec989ac21897a0b5d2ab6a87b0434f508d0cb2d5b /indra/newview/llpanelteleporthistory.cpp
parent9027f4430ddd9817f40b59c463d81a8cc3783c58 (diff)
EXT-7075 FIXED Map button now is always enabled and shows current user location if no other item is selected
- Added new pure virtual member function isSingleItemSelected() to the LLPanelPlacesTab. It is used in the LLPanelPlaces class inside onShowOnMapButtonClicked() to check if something was selected on the active panel. If so then selection is shown on the world map. Otherwise current agent position is shown on the world map. - Implemented isSingleItemSelected() in the both LLPanelPlacesTab derived classes: LLLandmarksPanel and LLTeleportHistoryPanel - Removed functionality which disables Map button if no selection is made Reviewed by Sergey Litovchuk at https://codereview.productengine.com/secondlife/r/355/ --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llpanelteleporthistory.cpp')
-rw-r--r--indra/newview/llpanelteleporthistory.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index c0b2244038..e8b6c6bfe5 100644
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -477,6 +477,12 @@ void LLTeleportHistoryPanel::onSearchEdit(const std::string& string)
}
// virtual
+bool LLTeleportHistoryPanel::isSingleItemSelected()
+{
+ return mLastSelectedFlatlList && mLastSelectedFlatlList->getSelectedItem();
+}
+
+// virtual
void LLTeleportHistoryPanel::onShowOnMap()
{
if (!mLastSelectedFlatlList)
@@ -557,7 +563,6 @@ void LLTeleportHistoryPanel::updateVerbs()
if (!mLastSelectedFlatlList)
{
mTeleportBtn->setEnabled(false);
- mShowOnMapBtn->setEnabled(false);
mShowProfile->setEnabled(false);
return;
}
@@ -565,8 +570,8 @@ void LLTeleportHistoryPanel::updateVerbs()
LLTeleportHistoryFlatItem* itemp = dynamic_cast<LLTeleportHistoryFlatItem *> (mLastSelectedFlatlList->getSelectedItem());
mTeleportBtn->setEnabled(NULL != itemp);
- mShowOnMapBtn->setEnabled(NULL != itemp);
mShowProfile->setEnabled(NULL != itemp);
+ mShowOnMapBtn->setEnabled(true);
}
void LLTeleportHistoryPanel::getNextTab(const LLDate& item_date, S32& tab_idx, LLDate& tab_date)