Fix Issue 1653: Using Search Box causes crash

This commit is contained in:
Inusaito Sayori
2014-09-04 17:31:11 -04:00
committed by Shyotl
parent 1608ed43c1
commit c7db5122c8
2 changed files with 9 additions and 2 deletions

View File

@@ -455,13 +455,13 @@ void LLFloaterDirectory::requestClassifieds()
void LLFloaterDirectory::searchInAll(const std::string& search_text)
{
start();
LLPanelDirFindAllInterface::search(sInstance->mFindAllPanel, search_text);
performQueryOn2("classified_panel", search_text);
performQueryOn2("events_panel", search_text);
performQueryOn2("groups_panel", search_text);
performQueryOn2("people_panel", search_text);
performQueryOn2("places_panel", search_text);
sInstance->open();
}
void LLFloaterDirectory::showFindAll(const std::string& search_text)
@@ -583,7 +583,7 @@ void LLFloaterDirectory::focusCurrentPanel()
}
// static
void LLFloaterDirectory::showPanel(const std::string& tabname)
void LLFloaterDirectory::start()
{
// This function gets called when web browser clicks are processed,
// so we don't delete the existing panel, which would delete the
@@ -593,6 +593,12 @@ void LLFloaterDirectory::showPanel(const std::string& tabname)
sInstance = new LLFloaterDirectory("directory");
}
sInstance->open(); /*Flawfinder: ignore*/
}
// static
void LLFloaterDirectory::showPanel(const std::string& tabname)
{
start();
sInstance->childShowTab("Directory Tabs", tabname);
sInstance->focusCurrentPanel();
}

View File

@@ -94,6 +94,7 @@ public:
private:
static void performQueryOn(const std::string& name, const std::string& search_text);
static void performQueryOn2(const std::string& name, const std::string& search_text);
static void start();
static void showPanel(const std::string& tabname);
/*virtual*/ void onClose(bool app_quitting);
void focusCurrentPanel();