summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelplaces.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelplaces.cpp')
-rw-r--r--indra/newview/llpanelplaces.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index cd4bcb6c0a..f7f3c5830d 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -261,6 +261,10 @@ void LLPanelPlaces::onOpen(const LLSD& key)
}
mLandmarkInfo->displayParcelInfo(LLUUID(), mPosGlobal);
+
+ // Disable Save button because there is no item to save yet.
+ // The button will be enabled in onLandmarkLoaded callback.
+ mSaveBtn->setEnabled(FALSE);
}
else if (mPlaceInfoType == LANDMARK_INFO_TYPE)
{
@@ -380,11 +384,16 @@ void LLPanelPlaces::onLandmarkLoaded(LLLandmark* landmark)
landmark->getRegionID(region_id);
landmark->getGlobalPos(mPosGlobal);
mLandmarkInfo->displayParcelInfo(region_id, mPosGlobal);
+
+ mSaveBtn->setEnabled(TRUE);
}
void LLPanelPlaces::onFilterEdit(const std::string& search_string, bool force_filter)
{
- if (force_filter || LLPanelPlacesTab::sFilterSubString != search_string)
+ if (!mActivePanel)
+ return;
+
+ if (force_filter || mActivePanel->getFilterSubString() != search_string)
{
std::string string = search_string;
@@ -392,8 +401,7 @@ void LLPanelPlaces::onFilterEdit(const std::string& search_string, bool force_fi
LLStringUtil::toUpper(string);
LLStringUtil::trimHead(string);
- if (mActivePanel)
- mActivePanel->onSearchEdit(string);
+ mActivePanel->onSearchEdit(string);
}
}
@@ -403,7 +411,7 @@ void LLPanelPlaces::onTabSelected()
if (!mActivePanel)
return;
- onFilterEdit(LLPanelPlacesTab::sFilterSubString, true);
+ onFilterEdit(mActivePanel->getFilterSubString(), true);
mActivePanel->updateVerbs();
}
@@ -814,7 +822,7 @@ void LLPanelPlaces::changedInventory(U32 mask)
// Filter applied to show all items.
if (mActivePanel)
- mActivePanel->onSearchEdit(LLPanelPlacesTab::sFilterSubString);
+ mActivePanel->onSearchEdit(mActivePanel->getFilterSubString());
// we don't need to monitor inventory changes anymore,
// so remove the observer