diff options
author | Paul ProductEngine <pguslisty@productengine.com> | 2012-01-04 14:50:15 +0200 |
---|---|---|
committer | Paul ProductEngine <pguslisty@productengine.com> | 2012-01-04 14:50:15 +0200 |
commit | 377a9ab9ac3b098492cbd010f3091c713ac6dc83 (patch) | |
tree | 4ba76b13d1d0591d9d0a0ad095e6e058b450b260 /indra | |
parent | 1b1ad93c5d341eb564a7e6fc1ae9298473d8a98e (diff) |
EXP-1586 ADDITIONAL FIX (Nearby chat window no longer persists between viewer startups)
- Got rid of confusing conditions.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llnearbychatbar.cpp | 23 | ||||
-rw-r--r-- | indra/newview/llnearbychatbar.h | 5 |
2 files changed, 2 insertions, 26 deletions
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index cb08ca8862..4512c14b7a 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -111,14 +111,7 @@ BOOL LLNearbyChatBar::postBuild() gSavedSettings.declareBOOL("nearbychat_history_visibility", mNearbyChat->getVisible(), "Visibility state of nearby chat history", TRUE); - // If mVisibilityControl is not empty it means that the visibility state of floater is saved between sessions, - // i.e. save_visibility="true" for this floater. - // So if we need to restore visibility state of floater we also need to restore visibility state of nearby chat history. - if (!mVisibilityControl.empty()) - { - // restore visibility of nearby chat history - mNearbyChat->setVisible(gSavedSettings.getBOOL("nearbychat_history_visibility")); - } + mNearbyChat->setVisible(gSavedSettings.getBOOL("nearbychat_history_visibility")); // Register for font change notifications LLViewerChat::setFontChangedCallback(boost::bind(&LLNearbyChatBar::onChatFontChange, this, _1)); @@ -152,18 +145,6 @@ bool LLNearbyChatBar::applyRectControl() return rect_controlled; } -void LLNearbyChatBar::saveChatHistoryVisibility() -{ - // save visibility state of nearby chat history panel if - // visibility of nearby chat floater is saved, i.e. save_visisbility="true" - // (if save_visisbility="true", mVisibilityControl == "floater_vis_chat_bar") - if (mVisibilityControl.size() > 1) - { - // save visibility of nearby chat history - gSavedSettings.setBOOL("nearbychat_history_visibility", mNearbyChat->getVisible()); - } -} - void LLNearbyChatBar::onChatFontChange(LLFontGL* fontp) { // Update things with the new font whohoo @@ -437,7 +418,7 @@ void LLNearbyChatBar::onToggleNearbyChatPanel() storeRectControl(); } - saveChatHistoryVisibility(); + gSavedSettings.setBOOL("nearbychat_history_visibility", mNearbyChat->getVisible()); } void LLNearbyChatBar::setMinimized(BOOL b) diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h index 84040b8aab..baf12a06ea 100644 --- a/indra/newview/llnearbychatbar.h +++ b/indra/newview/llnearbychatbar.h @@ -92,11 +92,6 @@ protected: LLLocalSpeakerMgr* mSpeakerMgr; S32 mExpandedHeight; -private: - - // Saves visibility of chat history panel - // if save_visibility="true" - void saveChatHistoryVisibility(); }; #endif |