summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatersearch.cpp
diff options
context:
space:
mode:
authorLynx Linden <lynx@lindenlab.com>2010-01-04 11:42:48 +0000
committerLynx Linden <lynx@lindenlab.com>2010-01-04 11:42:48 +0000
commit3726d3bda8d359216a683c93c155c1463da7348e (patch)
tree0fd487271a0e5206f2776f32ba28d8f0b123c93a /indra/newview/llfloatersearch.cpp
parent32657e37ab14e3ea4b5ff719e147fd720e895d77 (diff)
DEV-44136: Hide previous results when performing new search.
When a new search is performed, we first display a blank page in the search floater so that the previous results are not visible while the new results are being retrieved from the search server.
Diffstat (limited to 'indra/newview/llfloatersearch.cpp')
-rw-r--r--indra/newview/llfloatersearch.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp
index 595d84f9f0..c6d9fee630 100644
--- a/indra/newview/llfloatersearch.cpp
+++ b/indra/newview/llfloatersearch.cpp
@@ -77,6 +77,15 @@ void LLFloaterSearch::onOpen(const LLSD& key)
search(key);
}
+void LLFloaterSearch::onClose(bool app_quitting)
+{
+ if (! app_quitting)
+ {
+ // Show the blank home page ready for the next onOpen()
+ mBrowser->navigateHome();
+ }
+}
+
void LLFloaterSearch::handleMediaEvent(LLPluginClassMedia *self, EMediaEvent event)
{
switch (event)
@@ -110,6 +119,11 @@ void LLFloaterSearch::search(const LLSD &key)
return;
}
+ // display the blank home page first, to clear the display of
+ // any previous search results while the new results load.
+ // The home page is set in floater_search.xml as start_url.
+ mBrowser->navigateHome();
+
// reset the god level warning as we're sending the latest state
childHide("refresh_search");
mSearchGodLevel = gAgent.getGodLevel();