diff options
| author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-09-03 00:32:26 +0300 |
|---|---|---|
| committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-09-03 00:32:26 +0300 |
| commit | 785de381de313673fa38e86d9df10599aa22d03b (patch) | |
| tree | 39be9a866215ed52c259746c87b5938a74498fbe /indra/llui/llfloater.cpp | |
| parent | 15ca7e43eb46d1a2a0a306c0f53e13e57a03a482 (diff) | |
VWR-21127 FIXED Implemented restoring sidebar tabs that were detached in previous session.
It is now possible to detach some sidebar tabs, exit the viewer, login again and see those tabs still detached.
Also fixed incorrect saving of tabs dimensions implemented in the previous commit (766d6e749836).
Reviewed by Sergey Litovchuk
Diffstat (limited to 'indra/llui/llfloater.cpp')
| -rw-r--r-- | indra/llui/llfloater.cpp | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 0c4c857022..ff90806271 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -519,6 +519,36 @@ void LLFloater::storeDockStateControl() } } +LLRect LLFloater::getSavedRect() const +{ + LLRect rect; + + if (mRectControl.size() > 1) + { + rect = LLUI::sSettingGroups["floater"]->getRect(mRectControl); + } + + return rect; +} + +bool LLFloater::hasSavedRect() const +{ + return !getSavedRect().isEmpty(); +} + +// static +std::string LLFloater::getControlName(const std::string& name, const LLSD& key) +{ + std::string ctrl_name = name; + + // Add the key to the control name if appropriate. + if (key.isString() && !key.asString().empty()) + { + ctrl_name += "_" + key.asString(); + } + + return ctrl_name; +} void LLFloater::setVisible( BOOL visible ) { @@ -2664,13 +2694,7 @@ void LLFloater::setInstanceName(const std::string& name) mInstanceName = name; if (!mInstanceName.empty()) { - std::string ctrl_name = mInstanceName; - - // Add the key to the control name if appropriate. - if (mKey.isString() && !mKey.asString().empty()) - { - ctrl_name += "_" + mKey.asString(); - } + std::string ctrl_name = getControlName(mInstanceName, mKey); // save_rect and save_visibility only apply to registered floaters if (!mRectControl.empty()) |
