diff options
author | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-12-28 17:09:33 +0200 |
---|---|---|
committer | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-12-28 17:09:33 +0200 |
commit | 1474f3ae335c5286ad6254731dd6882a876e1bf8 (patch) | |
tree | c0d67dcbd78a84af8b4e489c6c36eb08b71830d9 /indra/newview/llsidetraypanelcontainer.cpp | |
parent | 5f44b76e22162ce37c714519a3d0c96b0ce24bf3 (diff) |
Fix for low bug EXT-3186 - Incorrect navigation as a result of using "Back" button in profile of resident.
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llsidetraypanelcontainer.cpp')
-rw-r--r-- | indra/newview/llsidetraypanelcontainer.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/indra/newview/llsidetraypanelcontainer.cpp b/indra/newview/llsidetraypanelcontainer.cpp index 3024492ab9..f2215a2250 100644 --- a/indra/newview/llsidetraypanelcontainer.cpp +++ b/indra/newview/llsidetraypanelcontainer.cpp @@ -38,6 +38,7 @@ static LLDefaultChildRegistry::Register<LLSideTrayPanelContainer> r2("panel_cont std::string LLSideTrayPanelContainer::PARAM_SUB_PANEL_NAME = "sub_panel_name"; LLSideTrayPanelContainer::Params::Params() + : default_panel_name("default_panel_name") { // Always hide tabs. hide_tabs(true); @@ -45,6 +46,7 @@ LLSideTrayPanelContainer::Params::Params() LLSideTrayPanelContainer::LLSideTrayPanelContainer(const Params& p) : LLTabContainer(p) + , mDefaultPanelName(p.default_panel_name) { } @@ -53,19 +55,14 @@ void LLSideTrayPanelContainer::onOpen(const LLSD& key) // Select specified panel and save navigation history. if(key.has(PARAM_SUB_PANEL_NAME)) { + //*NOTE dzaporozhan + // Navigation history is not used after fix for EXT-3186, + // openPreviousPanel() always opens default panel + // Save panel navigation history std::string panel_name = key[PARAM_SUB_PANEL_NAME]; - S32 old_index = getCurrentPanelIndex(); selectTabByName(panel_name); - - S32 new_index = getCurrentPanelIndex(); - - // Don't update navigation history if we are opening same panel again. - if(old_index != new_index) - { - mPanelHistory[panel_name] = old_index; - } } // Will reopen current panel if no panel name was passed. getCurrentPanel()->onOpen(key); @@ -73,11 +70,13 @@ void LLSideTrayPanelContainer::onOpen(const LLSD& key) void LLSideTrayPanelContainer::openPreviousPanel() { - std::string current_panel_name = getCurrentPanel()->getName(); - panel_navigation_history_t::const_iterator it = mPanelHistory.find(current_panel_name); - if(mPanelHistory.end() != it) + if(!mDefaultPanelName.empty()) + { + selectTabByName(mDefaultPanelName); + } + else { - selectTab(it->second); + selectTab(0); } } |