summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatersidetraytab.cpp
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2011-04-22 19:07:15 +0300
committerVadim ProductEngine <vsavchuk@productengine.com>2011-04-22 19:07:15 +0300
commit175f12350d351570712db03e15c1bc89af677ad8 (patch)
treeab7597375737d954e83691c32d6ce327f43651f2 /indra/newview/llfloatersidetraytab.cpp
parentb15dca22637b0b2c1947b758a93f51163fb48cf1 (diff)
STORM-1093 FIX "Dock" icon is still shown after a side panel has been docked with Ctrl+Shift+W.
Reason: When an undocked side tray tab floater got closed with Ctrl+Shift+W, LLSideTray::setTabDocked() was called. It docked the floater but didn't update the dock/undock icon. Fix: Made setTabDocked() a general purpose method, not a hack suitable for using only as a floater close callback in the basic viewer mode. It now updates the dock/undock icon. Other changes: * Replaced numerous calls to toggleTabDocked with setDocked(), that is safer because does exactly what you want. * Got rid of a duplicated floater close callback.
Diffstat (limited to 'indra/newview/llfloatersidetraytab.cpp')
-rw-r--r--indra/newview/llfloatersidetraytab.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/newview/llfloatersidetraytab.cpp b/indra/newview/llfloatersidetraytab.cpp
index 94407e6da0..9f15e62d84 100644
--- a/indra/newview/llfloatersidetraytab.cpp
+++ b/indra/newview/llfloatersidetraytab.cpp
@@ -47,5 +47,6 @@ LLFloaterSideTrayTab::~LLFloaterSideTrayTab()
void LLFloaterSideTrayTab::onClose(bool app_quitting)
{
- LLSideTray::getInstance()->setTabDocked(getName(), true);
+ // The floater is already being closed, so don't toggle it once more (that may crash viewer).
+ LLSideTray::getInstance()->setTabDocked(getName(), /* dock = */ true, /* toggle_floater = */ false);
}