summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelplaces.cpp
diff options
context:
space:
mode:
authorbea@american.lindenlab.com <bea@american.lindenlab.com>2009-12-04 13:29:05 -0800
committerbea@american.lindenlab.com <bea@american.lindenlab.com>2009-12-04 13:29:05 -0800
commitdab659adea63c744aa72c27935f62cce91d8ab7a (patch)
tree8bcc1d3b5ebb46e64efc4ff784e5e27844f01da0 /indra/newview/llpanelplaces.cpp
parent67d051e78cb9f7d1ba670b647229ac9974fb7896 (diff)
parentbef221e3aa42b92586e5783811742afdbf05cd92 (diff)
merge
Diffstat (limited to 'indra/newview/llpanelplaces.cpp')
-rw-r--r--indra/newview/llpanelplaces.cpp25
1 files changed, 16 insertions, 9 deletions
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 839b2ec45e..f7f3c5830d 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -118,7 +118,6 @@ static LLRegisterPanelClassWrapper<LLPanelPlaces> t_places("panel_places");
LLPanelPlaces::LLPanelPlaces()
: LLPanel(),
- mFilterSubString(LLStringUtil::null),
mActivePanel(NULL),
mFilterEditor(NULL),
mPlaceProfile(NULL),
@@ -262,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)
{
@@ -381,20 +384,24 @@ 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 || mFilterSubString != search_string)
+ if (!mActivePanel)
+ return;
+
+ if (force_filter || mActivePanel->getFilterSubString() != search_string)
{
- mFilterSubString = search_string;
+ std::string string = search_string;
// Searches are case-insensitive
- LLStringUtil::toUpper(mFilterSubString);
- LLStringUtil::trimHead(mFilterSubString);
+ LLStringUtil::toUpper(string);
+ LLStringUtil::trimHead(string);
- if (mActivePanel)
- mActivePanel->onSearchEdit(mFilterSubString);
+ mActivePanel->onSearchEdit(string);
}
}
@@ -404,7 +411,7 @@ void LLPanelPlaces::onTabSelected()
if (!mActivePanel)
return;
- onFilterEdit(mFilterSubString, true);
+ onFilterEdit(mActivePanel->getFilterSubString(), true);
mActivePanel->updateVerbs();
}
@@ -815,7 +822,7 @@ void LLPanelPlaces::changedInventory(U32 mask)
// Filter applied to show all items.
if (mActivePanel)
- mActivePanel->onSearchEdit(mFilterSubString);
+ mActivePanel->onSearchEdit(mActivePanel->getFilterSubString());
// we don't need to monitor inventory changes anymore,
// so remove the observer