From 047b74c4f4727c41ae1086d18a12a9cf5aad5fce Mon Sep 17 00:00:00 2001 From: Aimee Linden Date: Thu, 22 Jul 2010 17:46:47 +0100 Subject: EXT-8248 FIXED Can't teleport multiple friends --- indra/newview/llavataractions.cpp | 16 ++++++++++++++++ indra/newview/llavataractions.h | 12 +++++++++--- indra/newview/llpanelpeople.cpp | 20 ++++++++------------ indra/newview/llpanelpeople.h | 1 - indra/newview/llpanelpeoplemenus.cpp | 7 +++---- .../xui/en/menu_people_nearby_multiselect.xml | 9 +++++++++ 6 files changed, 45 insertions(+), 20 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index eedadb962f..b9ae976e58 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -689,6 +689,7 @@ void LLAvatarActions::toggleBlock(const LLUUID& id) LLMuteList::getInstance()->add(mute); } } + // static bool LLAvatarActions::canOfferTeleport(const LLUUID& id) { @@ -704,6 +705,21 @@ bool LLAvatarActions::canOfferTeleport(const LLUUID& id) return true; } +// static +bool LLAvatarActions::canOfferTeleport(const uuid_vec_t& ids) +{ + bool result = true; + for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it) + { + if(!canOfferTeleport(*it)) + { + result = false; + break; + } + } + return result; +} + void LLAvatarActions::inviteToGroup(const LLUUID& id) { LLFloaterGroupPicker* widget = LLFloaterReg::showTypedInstance("group_picker", LLSD(id)); diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h index cd8ac3b653..6313ae0759 100644 --- a/indra/newview/llavataractions.h +++ b/indra/newview/llavataractions.h @@ -171,12 +171,18 @@ public: static void csr(const LLUUID& id, std::string name); /** - * Checks whether can offer teleport to the avatar - * Can't offer only for offline friends + * Checks whether we can offer a teleport to the avatar, only offline friends + * cannot be offered a teleport. + * + * @return false if avatar is a friend and not visibly online */ static bool canOfferTeleport(const LLUUID& id); - + /** + * @return false if any one of the specified avatars a friend and not visibly online + */ + static bool canOfferTeleport(const uuid_vec_t& ids); + private: static bool callbackAddFriend(const LLSD& notification, const LLSD& response); static bool callbackAddFriendWithMessage(const LLSD& notification, const LLSD& response); diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 1c4476ca49..bb202c864d 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -754,12 +754,6 @@ void LLPanelPeople::buttonSetAction(const std::string& btn_name, const commit_si button->setClickedCallback(cb); } -bool LLPanelPeople::isFriendOnline(const LLUUID& id) -{ - uuid_vec_t ids = mOnlineFriendList->getIDs(); - return std::find(ids.begin(), ids.end(), id) != ids.end(); -} - void LLPanelPeople::updateButtons() { std::string cur_tab = getActiveTabName(); @@ -821,11 +815,11 @@ void LLPanelPeople::updateButtons() bool enable_calls = LLVoiceClient::getInstance()->isVoiceWorking() && LLVoiceClient::getInstance()->voiceEnabled(); - buttonSetEnabled("teleport_btn", friends_tab_active && item_selected && isFriendOnline(selected_uuids.front())); - buttonSetEnabled("view_profile_btn", item_selected); - buttonSetEnabled("im_btn", multiple_selected); // allow starting the friends conference for multiple selection - buttonSetEnabled("call_btn", multiple_selected && enable_calls); - buttonSetEnabled("share_btn", item_selected); // not implemented yet + buttonSetEnabled("view_profile_btn",item_selected); + buttonSetEnabled("share_btn", item_selected); + buttonSetEnabled("im_btn", multiple_selected); // allow starting the friends conference for multiple selection + buttonSetEnabled("call_btn", multiple_selected && enable_calls); + buttonSetEnabled("teleport_btn", multiple_selected && LLAvatarActions::canOfferTeleport(selected_uuids)); bool none_group_selected = item_selected && selected_id.isNull(); buttonSetEnabled("group_info_btn", !none_group_selected); @@ -1329,7 +1323,9 @@ void LLPanelPeople::onGroupCallButtonClicked() void LLPanelPeople::onTeleportButtonClicked() { - LLAvatarActions::offerTeleport(getCurrentItemID()); + uuid_vec_t selected_uuids; + getCurrentItemIDs(selected_uuids); + LLAvatarActions::offerTeleport(selected_uuids); } void LLPanelPeople::onShareButtonClicked() diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index e931537042..b875ac51a6 100644 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -72,7 +72,6 @@ private: void updateNearbyList(); void updateRecentList(); - bool isFriendOnline(const LLUUID& id); bool isItemsFreeOfFriends(const uuid_vec_t& uuids); void updateButtons(); diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp index efca3ae1c2..f12c4de2f7 100644 --- a/indra/newview/llpanelpeoplemenus.cpp +++ b/indra/newview/llpanelpeoplemenus.cpp @@ -81,6 +81,7 @@ LLContextMenu* NearbyMenu::createMenu() // registrar.add("Avatar.AddFriend", boost::bind(&LLAvatarActions::requestFriendshipDialog, mUUIDs)); // *TODO: unimplemented registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startConference, mUUIDs)); registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startAdhocCall, mUUIDs)); + registrar.add("Avatar.OfferTeleport", boost::bind(&NearbyMenu::offerTeleport, this)); registrar.add("Avatar.RemoveFriend",boost::bind(&LLAvatarActions::removeFriendsDialog, mUUIDs)); // registrar.add("Avatar.Share", boost::bind(&LLAvatarActions::startIM, mUUIDs)); // *TODO: unimplemented // registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, mUUIDs)); // *TODO: unimplemented @@ -168,8 +169,7 @@ bool NearbyMenu::enableContextMenuItem(const LLSD& userdata) } else if(item == std::string("can_offer_teleport")) { - const LLUUID& id = mUUIDs.front(); - return LLAvatarActions::canOfferTeleport(id); + return LLAvatarActions::canOfferTeleport(mUUIDs); } return false; } @@ -191,8 +191,7 @@ void NearbyMenu::offerTeleport() { // boost::bind cannot recognize overloaded method LLAvatarActions::offerTeleport(), // so we have to use a wrapper. - const LLUUID& id = mUUIDs.front(); - LLAvatarActions::offerTeleport(id); + LLAvatarActions::offerTeleport(mUUIDs); } } // namespace LLPanelPeopleMenus diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml b/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml index 588342595e..5d58a9d289 100644 --- a/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml +++ b/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml @@ -57,4 +57,13 @@ + + + + -- cgit v1.2.3 From 656158ce6eef5b9069520fd33d45c6d1868b5e47 Mon Sep 17 00:00:00 2001 From: ZaiLynch Date: Thu, 26 Aug 2010 09:03:37 +0200 Subject: fix for VWR-19505 --- indra/newview/llvoavatar.cpp | 9 --------- indra/newview/llvoavatar.h | 1 - indra/newview/llvoavatarself.cpp | 1 + 3 files changed, 1 insertion(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 89ce889a61..0f3a7c4e85 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2318,7 +2318,6 @@ BOOL LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) idleUpdateNameTag( root_pos_last ); idleUpdateRenderCost(); - idleUpdateTractorBeam(); return TRUE; } @@ -3079,14 +3078,6 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) } } -//-------------------------------------------------------------------- -// draw tractor beam when editing objects -//-------------------------------------------------------------------- -// virtual -void LLVOAvatar::idleUpdateTractorBeam() -{ -} - void LLVOAvatar::idleUpdateBelowWater() { F32 avatar_height = (F32)(getPositionGlobal().mdV[VZ]); diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 0934f5df36..0017f6b846 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -208,7 +208,6 @@ public: void idleUpdateWindEffect(); void idleUpdateNameTag(const LLVector3& root_pos_last); void idleUpdateRenderCost(); - void idleUpdateTractorBeam(); void idleUpdateBelowWater(); //-------------------------------------------------------------------- diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index a28482b4de..26fab47ae0 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -634,6 +634,7 @@ BOOL LLVOAvatarSelf::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) return TRUE; } LLVOAvatar::idleUpdate(agent, world, time); + idleUpdateTractorBeam(); return TRUE; } -- cgit v1.2.3 From 225dd434cfeb6a67c5878b41538dafe2a7f4a284 Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Thu, 26 Aug 2010 11:25:57 -0700 Subject: EXT-8668 - Fixing accidental case change for the sake of OCD. --- indra/newview/installers/windows/installer_template.nsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 49ae58d53a..d1cd335783 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -45,7 +45,7 @@ RequestExecutionLevel admin ; on Vista we must be admin because we write to Prog # *TODO: Move these into the language files themselves LangString LanguageCode ${LANG_DANISH} "da" LangString LanguageCode ${LANG_GERMAN} "de" -Langstring LanguageCode ${LANG_ENGLISH} "en" +LangString LanguageCode ${LANG_ENGLISH} "en" LangString LanguageCode ${LANG_SPANISH} "es" LangString LanguageCode ${LANG_FRENCH} "fr" LangString LanguageCode ${LANG_JAPANESE} "ja" -- cgit v1.2.3 From bdd1017d0d553bf0559eb9b59a9b6dbda1d5ca71 Mon Sep 17 00:00:00 2001 From: Ardy Lay Date: Mon, 30 Aug 2010 14:18:48 -0500 Subject: [mq]: VWR-19499-AppUriChatLimit --- indra/newview/llchatbar.cpp | 29 ++++++++++++++++++++++++----- indra/newview/llnearbychatbar.cpp | 32 ++++++++++++++++++++++++-------- 2 files changed, 48 insertions(+), 13 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index 967db21244..7d82ec3a71 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -673,11 +673,30 @@ public: bool handle(const LLSD& tokens, const LLSD& query_map, LLMediaCtrl* web) { - if (tokens.size() < 2) return false; - S32 channel = tokens[0].asInteger(); - std::string mesg = tokens[1].asString(); - send_chat_from_viewer(mesg, CHAT_TYPE_NORMAL, channel); - return true; + bool retval = false; + // Need at least 2 tokens to have a valid message. + if (tokens.size() < 2) + { + retval = false; + } + else + { + S32 channel = tokens[0].asInteger(); + // VWR-19499 Restrict function to chat channels greater than 0. + if ((channel > 0) && (channel < 2147483647)) + { + retval = true; + // Say mesg on channel + std::string mesg = tokens[1].asString(); + send_chat_from_viewer(mesg, CHAT_TYPE_NORMAL, channel); + } + else + { + retval = false; + // Tell us this is an unsupported SLurl. + } + } + return retval; } }; diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 4f9845d704..43630c13fd 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -865,14 +865,30 @@ public: bool handle(const LLSD& tokens, const LLSD& query_map, LLMediaCtrl* web) { - if (tokens.size() < 2) return false; - S32 channel = tokens[0].asInteger(); - - // Send unescaped message, see EXT-6353. - std::string unescaped_mesg (LLURI::unescape(tokens[1].asString())); - - send_chat_from_viewer(unescaped_mesg, CHAT_TYPE_NORMAL, channel); - return true; + bool retval = false; + // Need at least 2 tokens to have a valid message. + if (tokens.size() < 2) + { + retval = false; + } + else + { + S32 channel = tokens[0].asInteger(); + // VWR-19499 Restrict function to chat channels greater than 0. + if ((channel > 0) && (channel < 2147483647)) + { + retval = true; + // Send unescaped message, see EXT-6353. + std::string unescaped_mesg (LLURI::unescape(tokens[1].asString())); + send_chat_from_viewer(unescaped_mesg, CHAT_TYPE_NORMAL, channel); + } + else + { + retval = false; + // Tell us this is an unsupported SLurl. + } + } + return retval; } }; -- cgit v1.2.3 From 97d52e2a3e3e4ac4ac9290e0541fb2a6ab1ecfbd Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 31 Aug 2010 21:07:23 -0700 Subject: SNOW-680 VWR-10854 : Honour share with group and allow anyone to copy for snapshots --- indra/newview/llfloaterperms.cpp | 2 +- indra/newview/llfloatersnapshot.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index bb851a349e..74dfede23e 100644 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -115,7 +115,7 @@ U32 LLFloaterPerms::getEveryonePerms(std::string prefix) //static U32 LLFloaterPerms::getNextOwnerPerms(std::string prefix) { - U32 flags = 0; + U32 flags = PERM_MOVE; if ( gSavedSettings.getBOOL(prefix+"NextOwnerCopy") ) { flags |= PERM_COPY; diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index f58f704ff2..278fee799a 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -35,6 +35,7 @@ #include "llagentcamera.h" #include "llcallbacklist.h" #include "llcriticaldamp.h" +#include "llfloaterperms.h" #include "llui.h" #include "llfocusmgr.h" #include "llbutton.h" @@ -999,8 +1000,8 @@ void LLSnapshotLivePreview::saveTexture() LLFolderType::FT_SNAPSHOT_CATEGORY, LLInventoryType::IT_SNAPSHOT, PERM_ALL, // Note: Snapshots to inventory is a special case of content upload - PERM_NONE, // that ignores the user's premissions preferences and continues to - PERM_NONE, // always use these fairly permissive hard-coded initial perms. - MG + LLFloaterPerms::getGroupPerms(), // that is more permissive than other uploads + LLFloaterPerms::getEveryonePerms(), "Snapshot : " + pos_string, callback, expected_upload_cost, userdata); gViewerWindow->playSnapshotAnimAndSound(); -- cgit v1.2.3 From be07498847a4493792ebc943308c3592399d643d Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 31 Aug 2010 21:11:28 -0700 Subject: SNOW-683 VWR-8726 : Turn off swirling lights for scripted objects --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llviewermessage.cpp | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 9d911777d1..d3fcceb307 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2787,6 +2787,17 @@ Value 0 + EffectScriptChatParticles + + Comment + 1 = normal behavior, 0 = disable display of swirling lights when scripts communicate + Persist + 1 + Type + Boolean + Value + 1 + EnableRippleWater Comment diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 82bc084f68..781e324e25 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2964,7 +2964,8 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) // Make swirly things only for talking objects. (not script debug messages, though) if (chat.mSourceType == CHAT_SOURCE_OBJECT - && chat.mChatType != CHAT_TYPE_DEBUG_MSG) + && chat.mChatType != CHAT_TYPE_DEBUG_MSG + && gSavedSettings.getBOOL("EffectScriptChatParticles") ) { LLPointer psc = new LLViewerPartSourceChat(chatter->getPositionAgent()); psc->setSourceObject(chatter); -- cgit v1.2.3 From 6d8208bac94ca4ebdd8e4e1030cdb8e38ef3da9f Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 31 Aug 2010 21:34:02 -0700 Subject: SNOW-684 VWR-4232 : Some particles don't disappear when UI is hidden --- indra/newview/llhudeffectbeam.cpp | 5 +++++ indra/newview/llhudeffectbeam.h | 1 + indra/newview/llhudeffecttrail.cpp | 5 +++++ indra/newview/llhudeffecttrail.h | 1 + indra/newview/llhudobject.cpp | 21 +++++++++++++++++++++ indra/newview/llhudobject.h | 2 ++ indra/newview/pipeline.cpp | 21 +++++++++++++++++---- 7 files changed, 52 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llhudeffectbeam.cpp b/indra/newview/llhudeffectbeam.cpp index 078ccff2d0..37b7b2e75d 100644 --- a/indra/newview/llhudeffectbeam.cpp +++ b/indra/newview/llhudeffectbeam.cpp @@ -305,6 +305,11 @@ void LLHUDEffectBeam::render() } } +void LLHUDEffectBeam::renderForTimer() +{ + render(); +} + void LLHUDEffectBeam::setupParticle(const S32 i) { LLVector3d start_pos_global; diff --git a/indra/newview/llhudeffectbeam.h b/indra/newview/llhudeffectbeam.h index a700e4e657..fdee5178af 100644 --- a/indra/newview/llhudeffectbeam.h +++ b/indra/newview/llhudeffectbeam.h @@ -52,6 +52,7 @@ protected: ~LLHUDEffectBeam(); /*virtual*/ void render(); + /*virtual*/ void renderForTimer(); /*virtual*/ void packData(LLMessageSystem *mesgsys); /*virtual*/ void unpackData(LLMessageSystem *mesgsys, S32 blocknum); private: diff --git a/indra/newview/llhudeffecttrail.cpp b/indra/newview/llhudeffecttrail.cpp index 9072707974..39b526c1b5 100644 --- a/indra/newview/llhudeffecttrail.cpp +++ b/indra/newview/llhudeffecttrail.cpp @@ -280,3 +280,8 @@ void LLHUDEffectSpiral::render() return; } } + +void LLHUDEffectSpiral::renderForTimer() +{ + render(); +} diff --git a/indra/newview/llhudeffecttrail.h b/indra/newview/llhudeffecttrail.h index bade3ff997..6f5a328c63 100644 --- a/indra/newview/llhudeffecttrail.h +++ b/indra/newview/llhudeffecttrail.h @@ -62,6 +62,7 @@ protected: ~LLHUDEffectSpiral(); /*virtual*/ void render(); + /*virtual*/ void renderForTimer(); /*virtual*/ void packData(LLMessageSystem *mesgsys); /*virtual*/ void unpackData(LLMessageSystem *mesgsys, S32 blocknum); private: diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp index 6af0ae2b6a..3e814a0773 100644 --- a/indra/newview/llhudobject.cpp +++ b/indra/newview/llhudobject.cpp @@ -304,6 +304,27 @@ void LLHUDObject::renderAllForSelect() } } +// static +void LLHUDObject::renderAllForTimer() +{ + LLHUDObject *hud_objp; + + hud_object_list_t::iterator object_it; + for (object_it = sHUDObjects.begin(); object_it != sHUDObjects.end(); ) + { + hud_object_list_t::iterator cur_it = object_it++; + hud_objp = (*cur_it); + if (hud_objp->getNumRefs() == 1) + { + sHUDObjects.erase(cur_it); + } + else if (hud_objp->isVisible()) + { + hud_objp->renderForTimer(); + } + } +} + // static void LLHUDObject::sortObjects() { diff --git a/indra/newview/llhudobject.h b/indra/newview/llhudobject.h index ff70b6a52f..97145b9a84 100644 --- a/indra/newview/llhudobject.h +++ b/indra/newview/llhudobject.h @@ -69,6 +69,7 @@ public: static void updateAll(); static void renderAll(); static void renderAllForSelect(); + static void renderAllForTimer(); static void cleanupHUDObjects(); @@ -100,6 +101,7 @@ protected: virtual void render() = 0; virtual void renderForSelect() {}; + virtual void renderForTimer() {}; protected: U8 mType; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index e4c2ca9ae3..1ee3b84b5e 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -3211,11 +3211,24 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) LLVertexBuffer::unbind(); - if (!LLPipeline::sReflectionRender && !LLPipeline::sRenderDeferred && gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) + if (!LLPipeline::sReflectionRender && !LLPipeline::sRenderDeferred) { - // Render debugging beacons. - gObjectList.renderObjectBeacons(); - gObjectList.resetObjectBeacons(); + if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) + { + // Render debugging beacons. + gObjectList.renderObjectBeacons(); + gObjectList.resetObjectBeacons(); + } + else + { + // Make sure particle effects disappear + LLHUDObject::renderAllForTimer(); + } + } + else + { + // Make sure particle effects disappear + LLHUDObject::renderAllForTimer(); } LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderGeomEnd"); -- cgit v1.2.3 From 786df38c2a034b976c23479326ec3790d3e025c4 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 31 Aug 2010 21:36:45 -0700 Subject: SNOW-681 VWR-1852 : Local ruler mode aligned incorrectly for linked objects --- indra/newview/llselectmgr.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index c9b60bf7f5..fb60b1ece7 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -5629,6 +5629,10 @@ void LLSelectMgr::updateSelectionCenter() LLVector3d select_center; // keep a list of jointed objects for showing the joint HUDEffects + // Initialize the bounding box to the root prim, so the BBox orientation + // matches the root prim's (affecting the orientation of the manipulators). + bbox.addBBoxAgent( (mSelectedObjects->getFirstRootObject(TRUE))->getBoundingBoxAgent() ); + std::vector < LLViewerObject *> jointed_objects; for (LLObjectSelection::iterator iter = mSelectedObjects->begin(); -- cgit v1.2.3 From 2b5cfc2a4d887e2ac354a7ba98e9dae50c1cc2ed Mon Sep 17 00:00:00 2001 From: Aimee Linden Date: Wed, 1 Sep 2010 14:14:35 +0100 Subject: VWR-13221 (SNOW-188) FIXED Allow panning of the minimap Imported from Snowglobe. --- indra/newview/app_settings/settings.xml | 11 ++ indra/newview/llfloatermap.cpp | 9 +- indra/newview/llnetmap.cpp | 196 ++++++++++++++++----- indra/newview/llnetmap.h | 25 +-- indra/newview/skins/default/xui/en/floater_map.xml | 38 +--- .../newview/skins/default/xui/en/menu_mini_map.xml | 10 ++ 6 files changed, 197 insertions(+), 92 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 9d911777d1..46ae879aec 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4669,6 +4669,17 @@ Value 1 + MiniMapAutoCenter + + Comment + Center the focal point of the minimap. + Persist + 0 + Type + Boolean + Value + 1 + Marker Comment diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp index 0f8b709f29..c9d7eff02b 100644 --- a/indra/newview/llfloatermap.cpp +++ b/indra/newview/llfloatermap.cpp @@ -47,7 +47,10 @@ // // Constants // -const F32 MAP_MINOR_DIR_THRESHOLD = 0.08f; + +// The minor cardinal direction labels are hidden if their height is more +// than this proportion of the map. +const F32 MAP_MINOR_DIR_THRESHOLD = 0.07f; const S32 MAP_PADDING_LEFT = 0; const S32 MAP_PADDING_TOP = 2; const S32 MAP_PADDING_RIGHT = 2; @@ -93,7 +96,7 @@ BOOL LLFloaterMap::postBuild() mTextBoxNorthWest = getChild ("floater_map_northwest"); LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; - + registrar.add("Minimap.Zoom", boost::bind(&LLFloaterMap::handleZoom, this, _2)); registrar.add("Minimap.Tracker", boost::bind(&LLFloaterMap::handleStopTracking, this, _2)); @@ -255,7 +258,7 @@ void LLFloaterMap::reshape(S32 width, S32 height, BOOL called_from_parent) void LLFloaterMap::handleZoom(const LLSD& userdata) { std::string level = userdata.asString(); - + F32 scale = 0.0f; if (level == std::string("close")) scale = LLNetMap::MAP_SCALE_MAX; diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index e4a96cca14..12f77313d9 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -55,6 +55,7 @@ #include "llviewermenu.h" #include "llviewerobjectlist.h" #include "llviewerregion.h" +#include "llviewerwindow.h" #include "llworld.h" #include "llworldmapview.h" // shared draw code @@ -69,6 +70,7 @@ const F32 MAP_SCALE_ZOOM_FACTOR = 1.04f; // Zoom in factor per click of scroll w const F32 MIN_DOT_RADIUS = 3.5f; const F32 DOT_SCALE = 0.75f; const F32 MIN_PICK_SCALE = 2.f; +const S32 MOUSE_DRAG_SLOP = 2; // How far the mouse needs to move before we think it's a drag LLNetMap::LLNetMap (const Params & p) : LLUICtrl (p), @@ -77,11 +79,12 @@ LLNetMap::LLNetMap (const Params & p) mPixelsPerMeter( MAP_SCALE_MID / REGION_WIDTH_METERS ), mObjectMapTPM(0.f), mObjectMapPixels(0.f), - mTargetPanX(0.f), - mTargetPanY(0.f), - mCurPanX(0.f), - mCurPanY(0.f), - mUpdateNow(FALSE), + mTargetPan(0.f, 0.f), + mCurPan(0.f, 0.f), + mStartPan(0.f, 0.f), + mMouseDown(0, 0), + mPanning(false), + mUpdateNow(false), mObjectImageCenterGlobal( gAgentCamera.getCameraPositionGlobal() ), mObjectRawImagep(), mObjectImagep(), @@ -98,7 +101,9 @@ LLNetMap::~LLNetMap() void LLNetMap::setScale( F32 scale ) { - mScale = llclamp(scale, 0.1f, 16.f*1024.f); // [reasonably small , unreasonably large] + scale = llclamp(scale, MAP_SCALE_MIN, MAP_SCALE_MAX); + mCurPan *= scale / mScale; + mScale = scale; if (mObjectImagep.notNull()) { @@ -115,13 +120,7 @@ void LLNetMap::setScale( F32 scale ) mPixelsPerMeter = mScale / REGION_WIDTH_METERS; mDotRadius = llmax(DOT_SCALE * mPixelsPerMeter, MIN_DOT_RADIUS); - mUpdateNow = TRUE; -} - -void LLNetMap::translatePan( F32 delta_x, F32 delta_y ) -{ - mTargetPanX += delta_x; - mTargetPanY += delta_y; + mUpdateNow = true; } @@ -141,9 +140,12 @@ void LLNetMap::draw() { createObjectImage(); } - - mCurPanX = lerp(mCurPanX, mTargetPanX, LLCriticalDamp::getInterpolant(0.1f)); - mCurPanY = lerp(mCurPanY, mTargetPanY, LLCriticalDamp::getInterpolant(0.1f)); + + static LLUICachedControl auto_center("MiniMapAutoCenter", true); + if (auto_center) + { + mCurPan = lerp(mCurPan, mTargetPan, LLCriticalDamp::getInterpolant(0.1f)); + } // Prepare a scissor region F32 rotation = 0; @@ -174,8 +176,8 @@ void LLNetMap::draw() } // region 0,0 is in the middle - S32 center_sw_left = getRect().getWidth() / 2 + llfloor(mCurPanX); - S32 center_sw_bottom = getRect().getHeight() / 2 + llfloor(mCurPanY); + S32 center_sw_left = getRect().getWidth() / 2 + llfloor(mCurPan.mV[VX]); + S32 center_sw_bottom = getRect().getHeight() / 2 + llfloor(mCurPan.mV[VY]); gGL.pushMatrix(); @@ -256,26 +258,24 @@ void LLNetMap::draw() } gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); } - - - LLVector3d old_center = mObjectImageCenterGlobal; - LLVector3d new_center = gAgentCamera.getCameraPositionGlobal(); - - new_center.mdV[0] = (5.f/mObjectMapTPM)*floor(0.2f*mObjectMapTPM*new_center.mdV[0]); - new_center.mdV[1] = (5.f/mObjectMapTPM)*floor(0.2f*mObjectMapTPM*new_center.mdV[1]); - new_center.mdV[2] = 0.f; + // Redraw object layer periodically if (mUpdateNow || (map_timer.getElapsedTimeF32() > 0.5f)) { - mUpdateNow = FALSE; - mObjectImageCenterGlobal = new_center; + mUpdateNow = false; + + // Locate the centre of the object layer, accounting for panning + LLVector3 new_center = globalPosToView(gAgentCamera.getCameraPositionGlobal()); + new_center.mV[VX] -= mCurPan.mV[VX]; + new_center.mV[VY] -= mCurPan.mV[VY]; + new_center.mV[VZ] = 0.f; + mObjectImageCenterGlobal = viewPosToGlobal(new_center.mV[VX], new_center.mV[VY]); - // Center moved enough. // Create the base texture. U8 *default_texture = mObjectRawImagep->getData(); memset( default_texture, 0, mObjectImagep->getWidth() * mObjectImagep->getHeight() * mObjectImagep->getComponents() ); - // Draw buildings + // Draw objects gObjectList.renderObjectsForMap(*this); mObjectImagep->setSubImage(mObjectRawImagep, 0, 0, mObjectImagep->getWidth(), mObjectImagep->getHeight()); @@ -392,12 +392,16 @@ void LLNetMap::draw() // Draw dot for self avatar position pos_global = gAgent.getPositionGlobal(); pos_map = globalPosToView(pos_global); - LLUIImagePtr you = LLWorldMapView::sAvatarYouLargeImage; S32 dot_width = llround(mDotRadius * 2.f); - you->draw(llround(pos_map.mV[VX] - mDotRadius), - llround(pos_map.mV[VY] - mDotRadius), - dot_width, - dot_width); + LLUIImagePtr you = LLWorldMapView::sAvatarYouLargeImage; + if (you) + { + you->draw(llround(pos_map.mV[VX] - mDotRadius), + llround(pos_map.mV[VY] - mDotRadius), + dot_width, + dot_width); + } + // Draw frustum F32 meters_to_pixels = mScale/ LLWorld::getInstance()->getRegionWidthInMeters(); @@ -472,8 +476,8 @@ LLVector3 LLNetMap::globalPosToView( const LLVector3d& global_pos ) pos_local.rotVec( rot ); } - pos_local.mV[VX] += getRect().getWidth() / 2 + mCurPanX; - pos_local.mV[VY] += getRect().getHeight() / 2 + mCurPanY; + pos_local.mV[VX] += getRect().getWidth() / 2 + mCurPan.mV[VX]; + pos_local.mV[VY] += getRect().getHeight() / 2 + mCurPan.mV[VY]; return pos_local; } @@ -506,8 +510,8 @@ void LLNetMap::drawTracking(const LLVector3d& pos_global, const LLColor4& color, LLVector3d LLNetMap::viewPosToGlobal( S32 x, S32 y ) { - x -= llround(getRect().getWidth() / 2 + mCurPanX); - y -= llround(getRect().getHeight() / 2 + mCurPanY); + x -= llround(getRect().getWidth() / 2 + mCurPan.mV[VX]); + y -= llround(getRect().getHeight() / 2 + mCurPan.mV[VY]); LLVector3 pos_local( (F32)x, (F32)y, 0 ); @@ -532,10 +536,20 @@ LLVector3d LLNetMap::viewPosToGlobal( S32 x, S32 y ) BOOL LLNetMap::handleScrollWheel(S32 x, S32 y, S32 clicks) { // note that clicks are reversed from what you'd think: i.e. > 0 means zoom out, < 0 means zoom in - F32 scale = mScale; - - scale *= pow(MAP_SCALE_ZOOM_FACTOR, -clicks); - setScale(llclamp(scale, MAP_SCALE_MIN, MAP_SCALE_MAX)); + F32 new_scale = mScale * pow(MAP_SCALE_ZOOM_FACTOR, -clicks); + F32 old_scale = mScale; + + setScale(new_scale); + + static LLUICachedControl auto_center("MiniMapAutoCenter", true); + if (!auto_center) + { + // Adjust pan to center the zoom on the mouse pointer + LLVector2 zoom_offset; + zoom_offset.mV[VX] = x - getRect().getWidth() / 2; + zoom_offset.mV[VY] = y - getRect().getHeight() / 2; + mCurPan -= zoom_offset * mScale / old_scale - zoom_offset; + } return TRUE; } @@ -715,5 +729,99 @@ void LLNetMap::createObjectImage() mObjectImagep = LLViewerTextureManager::getLocalTexture( mObjectRawImagep.get(), FALSE); } setScale(mScale); - mUpdateNow = TRUE; + mUpdateNow = true; +} + +BOOL LLNetMap::handleMouseDown( S32 x, S32 y, MASK mask ) +{ + if (!(mask & MASK_SHIFT)) return FALSE; + + // Start panning + gFocusMgr.setMouseCapture(this); + + mStartPan = mCurPan; + mMouseDown.mX = x; + mMouseDown.mY = y; + return TRUE; +} + +BOOL LLNetMap::handleMouseUp( S32 x, S32 y, MASK mask ) +{ + if (hasMouseCapture()) + { + if (mPanning) + { + // restore mouse cursor + S32 local_x, local_y; + local_x = mMouseDown.mX + llfloor(mCurPan.mV[VX] - mStartPan.mV[VX]); + local_y = mMouseDown.mY + llfloor(mCurPan.mV[VY] - mStartPan.mV[VY]); + LLRect clip_rect = getRect(); + clip_rect.stretch(-8); + clip_rect.clipPointToRect(mMouseDown.mX, mMouseDown.mY, local_x, local_y); + LLUI::setMousePositionLocal(this, local_x, local_y); + + // finish the pan + mPanning = false; + + mMouseDown.set(0, 0); + + // auto centre + mTargetPan.setZero(); + } + gViewerWindow->showCursor(); + gFocusMgr.setMouseCapture(NULL); + return TRUE; + } + return FALSE; +} + +// static +bool LLNetMap::outsideSlop( S32 x, S32 y, S32 start_x, S32 start_y, S32 slop ) +{ + S32 dx = x - start_x; + S32 dy = y - start_y; + + return (dx <= -slop || slop <= dx || dy <= -slop || slop <= dy); +} + +BOOL LLNetMap::handleHover( S32 x, S32 y, MASK mask ) +{ + if (hasMouseCapture()) + { + if (mPanning || outsideSlop(x, y, mMouseDown.mX, mMouseDown.mY, MOUSE_DRAG_SLOP)) + { + if (!mPanning) + { + // just started panning, so hide cursor + mPanning = true; + gViewerWindow->hideCursor(); + } + + LLVector2 delta(static_cast(gViewerWindow->getCurrentMouseDX()), + static_cast(gViewerWindow->getCurrentMouseDY())); + + // Set pan to value at start of drag + offset + mCurPan += delta; + mTargetPan = mCurPan; + + gViewerWindow->moveCursorToCenter(); + } + + // Doesn't really matter, cursor should be hidden + gViewerWindow->setCursor( UI_CURSOR_TOOLPAN ); + } + else + { + if (mask & MASK_SHIFT) + { + // If shift is held, change the cursor to hint that the map can be dragged + gViewerWindow->setCursor( UI_CURSOR_TOOLPAN ); + } + else + { + gViewerWindow->setCursor( UI_CURSOR_CROSS ); + } + } + + return TRUE; } diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h index 6808642505..c5860ca82c 100644 --- a/indra/newview/llnetmap.h +++ b/indra/newview/llnetmap.h @@ -37,7 +37,6 @@ class LLColor4U; class LLCoordGL; class LLImageRaw; -class LLTextBox; class LLViewerTexture; class LLNetMap : public LLUICtrl @@ -66,17 +65,17 @@ public: /*virtual*/ void draw(); /*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); + /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); + /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask); + /*virtual*/ BOOL handleHover( S32 x, S32 y, MASK mask ); /*virtual*/ BOOL handleToolTip( S32 x, S32 y, MASK mask); /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); void setScale( F32 scale ); void setToolTipMsg(const std::string& msg) { mToolTipMsg = msg; } void renderScaledPointGlobal( const LLVector3d& pos, const LLColor4U &color, F32 radius ); - -private: - void translatePan( F32 delta_x, F32 delta_y ); - void setPan( F32 x, F32 y ) { mTargetPanX = x; mTargetPanY = y; } +private: const LLVector3d& getObjectImageCenterGlobal() { return mObjectImageCenterGlobal; } void renderPoint(const LLVector3 &pos, const LLColor4U &color, S32 diameter, S32 relative_height = 0); @@ -91,6 +90,10 @@ private: void createObjectImage(); private: + static bool outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y, S32 slop); + + bool mUpdateNow; + LLUIColor mBackgroundColor; F32 mScale; // Size of a region in pixels @@ -98,11 +101,13 @@ private: F32 mObjectMapTPM; // texels per meter on map F32 mObjectMapPixels; // Width of object map in pixels F32 mDotRadius; // Size of avatar markers - F32 mTargetPanX; - F32 mTargetPanY; - F32 mCurPanX; - F32 mCurPanY; - BOOL mUpdateNow; + + bool mPanning; // map is being dragged + LLVector2 mTargetPan; + LLVector2 mCurPan; + LLVector2 mStartPan; // pan offset at start of drag + LLCoordGL mMouseDown; // pointer position at start of drag + LLVector3d mObjectImageCenterGlobal; LLPointer mObjectRawImagep; LLPointer mObjectImagep; diff --git a/indra/newview/skins/default/xui/en/floater_map.xml b/indra/newview/skins/default/xui/en/floater_map.xml index efd96624ab..5495e11015 100644 --- a/indra/newview/skins/default/xui/en/floater_map.xml +++ b/indra/newview/skins/default/xui/en/floater_map.xml @@ -7,8 +7,8 @@ follows="top|right" height="174" layout="topleft" - min_height="174" - min_width="174" + min_height="128" + min_width="128" name="Map" title="" help_topic="map" @@ -18,41 +18,9 @@ left="0" top="0" width="200"> - - N - - - E - - - W - - - S - - - SE - - - NE - - - SW - - - NW - - [AGENT][REGION](Double-click to open Map) + [AGENT][REGION](Double-click to open Map, shift-drag to pan) MINIMAP diff --git a/indra/newview/skins/default/xui/en/menu_mini_map.xml b/indra/newview/skins/default/xui/en/menu_mini_map.xml index f5ea3e735b..8fe89d3934 100644 --- a/indra/newview/skins/default/xui/en/menu_mini_map.xml +++ b/indra/newview/skins/default/xui/en/menu_mini_map.xml @@ -29,6 +29,7 @@ function="Minimap.Zoom" parameter="far" /> + @@ -38,6 +39,15 @@ function="ToggleControl" parameter="MiniMapRotate" /> + + + + Date: Wed, 1 Sep 2010 14:22:38 +0100 Subject: VWR-17653 (SNOW-734) FIXED Show inspectors for avatars on the MiniMap Imported from Snowglobe. --- indra/newview/llnetmap.cpp | 66 ++++++++++++++++------ indra/newview/llnetmap.h | 3 +- indra/newview/skins/default/xui/en/floater_map.xml | 2 +- 3 files changed, 53 insertions(+), 18 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 12f77313d9..031656f7f8 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -361,7 +361,8 @@ void LLNetMap::draw() show_as_friend ? map_avatar_friend_color : map_avatar_color, pos_map.mV[VZ], mDotRadius); - F32 dist_to_cursor = dist_vec(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), LLVector2(local_mouse_x,local_mouse_y)); + F32 dist_to_cursor = dist_vec(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), + LLVector2(local_mouse_x,local_mouse_y)); if(dist_to_cursor < min_pick_dist && dist_to_cursor < closest_dist) { closest_dist = dist_to_cursor; @@ -400,8 +401,14 @@ void LLNetMap::draw() llround(pos_map.mV[VY] - mDotRadius), dot_width, dot_width); - } + F32 dist_to_cursor = dist_vec(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), + LLVector2(local_mouse_x,local_mouse_y)); + if(dist_to_cursor < min_pick_dist && dist_to_cursor < closest_dist) + { + mClosestAgentToCursor = gAgent.getID(); + } + } // Draw frustum F32 meters_to_pixels = mScale/ LLWorld::getInstance()->getRegionWidthInMeters(); @@ -560,20 +567,32 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, MASK mask ) { return FALSE; } - - // mToolTipMsg = "[AGENT][REGION](Double-click to open Map)" - - LLStringUtil::format_map_t args; - std::string fullname; - if(mClosestAgentToCursor.notNull() && gCacheName->getFullName(mClosestAgentToCursor, fullname)) - { - args["[AGENT]"] = fullname + "\n"; - } - else + + std::string avatar_name; + if(mClosestAgentToCursor.notNull() && gCacheName->getFullName(mClosestAgentToCursor, avatar_name)) { - args["[AGENT]"] = ""; + // only show tooltip if same inspector not already open + LLFloater* existing_inspector = LLFloaterReg::findInstance("inspect_avatar"); + if (!existing_inspector + || !existing_inspector->getVisible() + || existing_inspector->getKey()["avatar_id"].asUUID() != mClosestAgentToCursor) + { + LLInspector::Params p; + p.fillFrom(LLUICtrlFactory::instance().getDefaultParams()); + p.message(avatar_name); + p.image.name("Inspector_I"); + p.click_callback(boost::bind(showAvatarInspector, mClosestAgentToCursor)); + p.visible_time_near(6.f); + p.visible_time_far(3.f); + p.delay_time(0.35f); + p.wrap(false); + + LLToolTipMgr::instance().show(p); + } + return TRUE; } - + + LLStringUtil::format_map_t args; LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal( viewPosToGlobal( x, y ) ); if( region ) { @@ -583,10 +602,10 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, MASK mask ) { args["[REGION]"] = ""; } - + std::string msg = mToolTipMsg; LLStringUtil::format(msg, args); - + LLRect sticky_rect; // set sticky_rect if (region) @@ -606,6 +625,21 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, MASK mask ) return TRUE; } +// static +void LLNetMap::showAvatarInspector(const LLUUID& avatar_id) +{ + LLSD params; + params["avatar_id"] = avatar_id; + + if (LLToolTipMgr::instance().toolTipVisible()) + { + LLRect rect = LLToolTipMgr::instance().getToolTipRect(); + params["pos"]["x"] = rect.mLeft; + params["pos"]["y"] = rect.mTop; + } + + LLFloaterReg::showInstance("inspect_avatar", params); +} void LLNetMap::renderScaledPointGlobal( const LLVector3d& pos, const LLColor4U &color, F32 radius_meters ) { diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h index c5860ca82c..e25ada4c95 100644 --- a/indra/newview/llnetmap.h +++ b/indra/newview/llnetmap.h @@ -86,7 +86,8 @@ private: void drawTracking( const LLVector3d& pos_global, const LLColor4& color, BOOL draw_arrow = TRUE); - + static void showAvatarInspector(const LLUUID& avatar_id); + void createObjectImage(); private: diff --git a/indra/newview/skins/default/xui/en/floater_map.xml b/indra/newview/skins/default/xui/en/floater_map.xml index 5495e11015..6370ff9243 100644 --- a/indra/newview/skins/default/xui/en/floater_map.xml +++ b/indra/newview/skins/default/xui/en/floater_map.xml @@ -20,7 +20,7 @@ width="200"> - [AGENT][REGION](Double-click to open Map, shift-drag to pan) + [REGION](Double-click to open Map, shift-drag to pan) MINIMAP -- cgit v1.2.3 From 711ccfa57f5feb526bea6d3cea8d41a7079179b0 Mon Sep 17 00:00:00 2001 From: Aimee Linden Date: Wed, 1 Sep 2010 15:05:24 +0100 Subject: VWR-13221 (SNOW-188) SUPPLEMENTARY Allow panning of the minimap Fix Linux build. --- indra/newview/llnetmap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 031656f7f8..6db8001d57 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -269,7 +269,7 @@ void LLNetMap::draw() new_center.mV[VX] -= mCurPan.mV[VX]; new_center.mV[VY] -= mCurPan.mV[VY]; new_center.mV[VZ] = 0.f; - mObjectImageCenterGlobal = viewPosToGlobal(new_center.mV[VX], new_center.mV[VY]); + mObjectImageCenterGlobal = viewPosToGlobal(llfloor(new_center.mV[VX]), llfloor(new_center.mV[VY])); // Create the base texture. U8 *default_texture = mObjectRawImagep->getData(); -- cgit v1.2.3 From 82c7366e20d8944fe39b5789b0e74ecb0c06368e Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Wed, 1 Sep 2010 19:14:41 +0300 Subject: VWR-21060 FIXED opening side tray tabs via shortcut, menu item or button outside of Side Tray. Reviewed by Vadim Savchuk. --- indra/newview/llsidetray.cpp | 103 ++++++++++++++++++++++++++++++------------- indra/newview/llsidetray.h | 8 ++-- 2 files changed, 76 insertions(+), 35 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 85b6e0dec4..3d6fc0d8fd 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -212,10 +212,12 @@ void LLSideTrayTab::onOpen (const LLSD& key) void LLSideTrayTab::toggleTabDocked() { - LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", LLSD().with("name", mTabTitle)); + std::string tab_name = getName(); + + LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", LLSD().with("name", tab_name)); if (!floater_tab) return; - LLFloaterReg::toggleInstance("side_bar_tab", LLSD().with("name", mTabTitle)); + LLFloaterReg::toggleInstance("side_bar_tab", LLSD().with("name", tab_name)); LLSideTray* side_tray = LLSideTray::getInstance(); @@ -334,10 +336,9 @@ public: tab->toggleTabDocked(); - LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", LLSD().with("name", tab->getTabTitle())); + LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", LLSD().with("name", tab->getName())); if (!floater_tab) return FALSE; - LLRect original_rect = floater_tab->getRect(); S32 header_snap_y = floater_tab->getHeaderHeight() / 2; S32 snap_x = screen_x - original_rect.mLeft - original_rect.getWidth() / 2; @@ -485,6 +486,54 @@ void LLSideTray::toggleTabButton(LLSideTrayTab* tab) } } +LLPanel* LLSideTray::openChildPanel(LLSideTrayTab* tab, const std::string& panel_name, const LLSD& params) +{ + LLView* view = tab->findChildView(panel_name, true); + if (!view) return NULL; + + std::string tab_name = tab->getName(); + + // Select tab and expand Side Tray only when a tab is attached. + if (isTabAttached(tab_name)) + { + selectTabByName(tab_name); + if (mCollapsed) + expandSideBar(); + } + else + { + LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", LLSD().with("name", tab_name)); + if (!floater_tab) return NULL; + + // Restore the floater if it was minimized. + if (floater_tab->isMinimized()) + { + floater_tab->setMinimized(FALSE); + } + + // Send the floater to the front. + floater_tab->setFrontmost(); + } + + LLSideTrayPanelContainer* container = dynamic_cast(view->getParent()); + if (container) + { + LLSD new_params = params; + new_params[LLSideTrayPanelContainer::PARAM_SUB_PANEL_NAME] = panel_name; + container->onOpen(new_params); + + return container->getCurrentPanel(); + } + + LLPanel* panel = dynamic_cast(view); + if (panel) + { + panel->onOpen(params); + } + + return panel; +} + bool LLSideTray::selectTabByIndex(size_t index) { if(index>=mTabs.size()) @@ -623,6 +672,9 @@ bool LLSideTray::removeTab(LLSideTrayTab* tab) removeChild(tab); mTabs.erase(tab_it); + // Add the tab to detached tabs list. + mDetachedTabs.push_back(tab); + // Remove the button from the buttons panel so that it isn't drawn anymore. mButtonsPanel->removeChild(btn); @@ -684,6 +736,13 @@ bool LLSideTray::addTab(LLSideTrayTab* tab) // Arrange tabs after inserting a new one. arrange(); + // Remove the tab from the list of detached tabs. + child_vector_iter_t tab_it = std::find(mDetachedTabs.begin(), mDetachedTabs.end(), tab); + if (tab_it != mDetachedTabs.end()) + { + mDetachedTabs.erase(tab_it); + } + return true; } @@ -919,35 +978,19 @@ void LLSideTray::reshape(S32 width, S32 height, BOOL called_from_parent) */ LLPanel* LLSideTray::showPanel (const std::string& panel_name, const LLSD& params) { - //arrange tabs + // Look up the tab in the list of detached tabs. child_vector_const_iter_t child_it; - for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it) + for ( child_it = mDetachedTabs.begin(); child_it != mDetachedTabs.end(); ++child_it) { - LLView* view = (*child_it)->findChildView(panel_name,true); - if(view) - { - selectTabByName ((*child_it)->getName()); - if(mCollapsed) - expandSideBar(); - - LLSideTrayPanelContainer* container = dynamic_cast(view->getParent()); - if(container) - { - LLSD new_params = params; - new_params[LLSideTrayPanelContainer::PARAM_SUB_PANEL_NAME] = panel_name; - container->onOpen(new_params); - - return container->getCurrentPanel(); - } - - LLPanel* panel = dynamic_cast(view); - if(panel) - { - panel->onOpen(params); - } + LLPanel* panel = openChildPanel(*child_it, panel_name, params); + if (panel) return panel; + } - return panel; - } + // Look up the tab in the list of attached tabs. + for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it) + { + LLPanel* panel = openChildPanel(*child_it, panel_name, params); + if (panel) return panel; } return NULL; } diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h index f0cc2c1146..f60c72e7a3 100644 --- a/indra/newview/llsidetray.h +++ b/indra/newview/llsidetray.h @@ -177,6 +177,8 @@ protected: void toggleTabButton (LLSideTrayTab* tab); + LLPanel* openChildPanel (LLSideTrayTab* tab, const std::string& panel_name, const LLSD& params); + private: // Implementation of LLDestroyClass static void destroyClass() @@ -187,15 +189,11 @@ private: } private: - - typedef std::pair detached_tab_t; - typedef std::map detached_tab_map_t; - LLPanel* mButtonsPanel; typedef std::map button_map_t; button_map_t mTabButtons; child_vector_t mTabs; - detached_tab_map_t mDetachedTabs; + child_vector_t mDetachedTabs; tab_order_vector_t mOriginalTabOrder; LLSideTrayTab* mActiveTab; -- cgit v1.2.3 From 4020b91ec6e8ab4994969ddda37f5ebbd9985367 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Wed, 1 Sep 2010 21:11:25 +0300 Subject: VWR-21127 WIP Implemented saving position and dimensions of detached sidebar tabs. Reviewed by Sergey Litovchuk. --- indra/newview/llsidetray.cpp | 8 ++++---- indra/newview/skins/default/xui/en/floater_side_bar_tab.xml | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 3d6fc0d8fd..3f0c1fa946 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -214,10 +214,10 @@ void LLSideTrayTab::toggleTabDocked() { std::string tab_name = getName(); - LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", LLSD().with("name", tab_name)); + LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", tab_name); if (!floater_tab) return; - LLFloaterReg::toggleInstance("side_bar_tab", LLSD().with("name", tab_name)); + LLFloaterReg::toggleInstance("side_bar_tab", tab_name); LLSideTray* side_tray = LLSideTray::getInstance(); @@ -336,7 +336,7 @@ public: tab->toggleTabDocked(); - LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", LLSD().with("name", tab->getName())); + LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", tab->getName()); if (!floater_tab) return FALSE; LLRect original_rect = floater_tab->getRect(); @@ -502,7 +502,7 @@ LLPanel* LLSideTray::openChildPanel(LLSideTrayTab* tab, const std::string& panel } else { - LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", LLSD().with("name", tab_name)); + LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", tab_name); if (!floater_tab) return NULL; // Restore the floater if it was minimized. diff --git a/indra/newview/skins/default/xui/en/floater_side_bar_tab.xml b/indra/newview/skins/default/xui/en/floater_side_bar_tab.xml index 1466c2d2a5..35df6a37f6 100644 --- a/indra/newview/skins/default/xui/en/floater_side_bar_tab.xml +++ b/indra/newview/skins/default/xui/en/floater_side_bar_tab.xml @@ -1,5 +1,7 @@ + can_resize="true" + save_rect="true" + > -- cgit v1.2.3 From 61555ce1f0d2b45ec21fe123ab604b6e18c21ccc Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Wed, 1 Sep 2010 22:58:29 +0300 Subject: VWR-20696 ADDITIONAL FIX Added calling onOpen() for tabs being undocked. Reviewed by Vadim Savchuk. --- indra/newview/llsidetray.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 3f0c1fa946..9893370dcf 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -250,6 +250,13 @@ void LLSideTrayTab::toggleTabDocked() { side_tray->collapseSideBar(); } + + if (side_tray->getActiveTab() != this) + { + // When a tab other then current active tab is detached from Side Tray + // onOpen() should be called as tab visibility is changed. + onOpen(LLSD()); + } } else { -- cgit v1.2.3 From c2935e40a6966f47ebd87705dd730ab0960e2b6d Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Thu, 2 Sep 2010 20:13:25 +0300 Subject: VWR-20696 ADDITIONAL FIX Fix dock/undock button image changing depending on tab state. --- indra/newview/llsidetray.cpp | 10 +++++++++- .../skins/default/xui/en/panel_side_tray_tab_caption.xml | 15 ++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 9893370dcf..086e35dfdc 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -176,6 +176,7 @@ BOOL LLSideTrayTab::postBuild() title_panel->getChild(TAB_PANEL_CAPTION_TITLE_BOX)->setValue(mTabTitle); + getChild("undock")->setCommitCallback(boost::bind(&LLSideTrayTab::toggleTabDocked, this)); getChild("dock")->setCommitCallback(boost::bind(&LLSideTrayTab::toggleTabDocked, this)); return true; @@ -221,7 +222,14 @@ void LLSideTrayTab::toggleTabDocked() LLSideTray* side_tray = LLSideTray::getInstance(); - if (LLFloater::isShown(floater_tab)) + bool is_tab_undocked = LLFloater::isShown(floater_tab); + + // Hide the "Tear Off" button when a tab gets undocked + // and show "Dock" button instead. + getChild("undock")->setVisible(!is_tab_undocked); + getChild("dock")->setVisible(is_tab_undocked); + + if (is_tab_undocked) { // Remove the tab from Side Tray's tabs list. // We have to do it despite removing the tab from Side Tray's child view tree diff --git a/indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml b/indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml index 60c2e0830c..349b625cef 100644 --- a/indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml +++ b/indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml @@ -22,6 +22,18 @@ - + + - + - + - + - + - + - + Date: Mon, 6 Sep 2010 22:56:14 +0300 Subject: VWR-22690 FIXED Implemented save/load of bottomtray button order. - Added methods responsible for saving and loading order of buttons to bottomtray. Order is saved after each drag'n'drop to ensure user's customization of bottomtray is not lost because of crash. - Added additional argument to layoutstack movePanel() method which tells it to move panel to the beginning of mPanels vector without requiring a pointer to panel before which it should be inserted. Reviewed by Vadim Savchuk. --- indra/newview/llbottomtray.cpp | 73 ++++++++++++++++++++++++++++++++++++++++++ indra/newview/llbottomtray.h | 5 +++ 2 files changed, 78 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 9869ae6e2d..053c400e74 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -50,10 +50,13 @@ #include "llviewerparcelmgr.h" #include "llviewerwindow.h" +#include "llsdserialize.h" // Distance from mouse down on which drag'n'drop should be started. #define DRAG_START_DISTANCE 3 +static const std::string SORTING_DATA_FILE_NAME = "bottomtray_buttons_order.xml"; + LLDefaultChildRegistry::Register bottomtray_button("bottomtray_button"); // LLBottomtrayButton methods @@ -549,6 +552,8 @@ BOOL LLBottomTray::postBuild() showWellButton(RS_IM_WELL, !LLIMWellWindow::getInstance()->isWindowEmpty()); showWellButton(RS_NOTIFICATION_WELL, !LLNotificationWellWindow::getInstance()->isWindowEmpty()); + loadButtonsOrder(); + LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(boost::bind(&update_build_button_enable_state)); return TRUE; @@ -691,6 +696,74 @@ void LLBottomTray::updateButtonsOrdersAfterDnD() ++it2; } } + + saveButtonsOrder(); +} + +void LLBottomTray::saveButtonsOrder() +{ + std::string user_dir = gDirUtilp->getLindenUserDir(); + if (user_dir.empty()) return; + + std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SORTING_DATA_FILE_NAME); + LLSD settings_llsd; + int i = 0; + const resize_state_vec_t::const_iterator it_end = mButtonsOrder.end(); + // we use numbers as keys for map which is saved in file and contains resize states as its values + for (resize_state_vec_t::const_iterator it = mButtonsOrder.begin(); it != it_end; ++it, i++) + { + std::string str = llformat("%d", i); + settings_llsd[str] = *it; + } + llofstream file; + file.open(filename); + LLSDSerialize::toPrettyXML(settings_llsd, file); +} + +void LLBottomTray::loadButtonsOrder() +{ + // load per-resident sorting information + std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SORTING_DATA_FILE_NAME); + + LLSD settings_llsd; + llifstream file; + file.open(filename); + if (!file.is_open()) return; + + LLSDSerialize::fromXML(settings_llsd, file); + + + mButtonsOrder.clear(); + mButtonsProcessOrder.clear(); + int i = 0; + // getting button order from file + for (LLSD::map_const_iterator iter = settings_llsd.beginMap(); + iter != settings_llsd.endMap(); ++iter, ++i) + { + std::string str = llformat("%d", i); + EResizeState state = (EResizeState)settings_llsd[str].asInteger(); + mButtonsOrder.push_back(state); + // RS_BUTTON_SPEAK is skipped, because it shouldn't be in mButtonsProcessOrder (it does not hide or shrink). + if (state != RS_BUTTON_SPEAK) + { + mButtonsProcessOrder.push_back(state); + } + } + + // There are other panels in layout stack order of which is not saved. Also, panels order of which is saved, + // are already in layout stack but in wrong order. The most convenient way to place them is moving them + // to front one by one (because in this case we don't have to pass the panel before which we want to insert our + // panel to movePanel()). So panels are moved in order from the end of mButtonsOrder vector(reverse iterator is used). + const resize_state_vec_t::const_reverse_iterator it_end = mButtonsOrder.rend(); + // placing panels in layout stack according to button order which we loaded in previous for + for (resize_state_vec_t::const_reverse_iterator it = mButtonsOrder.rbegin(); it != it_end; ++it, ++i) + { + LLPanel* panel_to_move = *it == RS_BUTTON_SPEAK ? mSpeakPanel : mStateProcessedObjectMap[*it]; + mToolbarStack->movePanel(panel_to_move, NULL, true); // prepend + } + // Nearbychat is not stored in order settings file, but it must be the first of the panels, so moving it + // manually here + mToolbarStack->movePanel(mNearbyChatBar, NULL, true); } void LLBottomTray::onDraggableButtonMouseUp(LLUICtrl* ctrl, S32 x, S32 y, MASK mask) diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 6697d6f679..0973445157 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -188,6 +188,11 @@ private: */ void updateButtonsOrdersAfterDnD(); + // saves order of buttons to file on disk + void saveButtonsOrder(); + // reads order of buttons from file on disk + void loadButtonsOrder(); + /** * Updates child controls size and visibility when it is necessary to reduce total width. * -- cgit v1.2.3 From eb10840623b6f0386a7990ee946cfa5879094fb3 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 7 Sep 2010 18:16:46 +0100 Subject: Fix some build errors. --- indra/newview/llbottomtray.cpp | 3 ++- indra/newview/llbottomtray.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 053c400e74..f3ade83d00 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -655,7 +655,8 @@ void LLBottomTray::updateButtonsOrdersAfterDnD() // Speak button is currently the only draggable button not in mStateProcessedObjectMap, // so if dragged_state is not found in that map, it should be RS_BUTTON_SPEAK. Change this code if any other // exclusions from mStateProcessedObjectMap will become draggable. - EResizeState dragged_state = RS_BUTTON_SPEAK, landing_state; + EResizeState dragged_state = RS_BUTTON_SPEAK; + EResizeState landing_state = RS_NORESIZE; bool landing_state_found = false; // Find states for dragged item and landing tab for (; it != it_end; ++it) diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 0973445157..14a29895f5 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -63,7 +63,7 @@ public: /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); protected: - LLBottomtrayButton::LLBottomtrayButton(const Params& p) + LLBottomtrayButton(const Params& p) : LLButton(p) { -- cgit v1.2.3 From bb51a764ece0f48161ddea1c519a7e427ccfdf23 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Wed, 8 Sep 2010 11:30:50 -0400 Subject: SNOW-606 FIX disable packaging of libuuid Patch taken from JIRA, committing locally to fix our project branch. Code reviewed by Nyx / Brad (transplanted from 06c4d6b5d67f6624d76b5a7f61021ef2d53f44b4) --- indra/newview/viewer_manifest.py | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 08ba8c13b1..c447a977f0 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -922,7 +922,6 @@ class Linux_i686Manifest(LinuxManifest): self.path("libcrypto.so.0.9.7") self.path("libexpat.so.1") self.path("libssl.so.0.9.7") - self.path("libuuid.so.1") self.path("libSDL-1.2.so.0") self.path("libELFIO.so") self.path("libopenjpeg.so.1.3.0", "libopenjpeg.so.1.3") -- cgit v1.2.3 From 4c667a105132c4a3b6465ae6dfac979b51d3d285 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 9 Sep 2010 13:35:02 +0100 Subject: CID-504 Checker: UNINIT_CTOR Function: LLWearableItemTypeNameComparator::LLWearableTypeOrder::LLWearableTypeOrder() File: /indra/newview/llwearableitemslist.h --- indra/newview/llwearableitemslist.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index 2b05273dc7..b060c9f076 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -361,7 +361,7 @@ private: bool mSortWearableTypeByName; LLWearableTypeOrder(ETypeListOrder order_priority, bool sort_asset_by_name, bool sort_wearable_by_name); - LLWearableTypeOrder(){}; + LLWearableTypeOrder() : mOrderPriority(ORDER_RANK_UNKNOWN), mSortAssetTypeByName(false), mSortWearableTypeByName(false) {}; }; ETypeListOrder getTypeListOrder(LLAssetType::EType item_type) const; -- cgit v1.2.3 From 2f7fa7ba205f6f473f816dd2e1b42d49090ddd50 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 9 Sep 2010 13:36:02 +0100 Subject: Backed out changeset 1c8d9c22bf94 --- indra/newview/viewer_manifest.py | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index c447a977f0..08ba8c13b1 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -922,6 +922,7 @@ class Linux_i686Manifest(LinuxManifest): self.path("libcrypto.so.0.9.7") self.path("libexpat.so.1") self.path("libssl.so.0.9.7") + self.path("libuuid.so.1") self.path("libSDL-1.2.so.0") self.path("libELFIO.so") self.path("libopenjpeg.so.1.3.0", "libopenjpeg.so.1.3") -- cgit v1.2.3 From 332f502ede8cc807c75eb2f6ff3c6b6aeab9e473 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 9 Sep 2010 13:56:44 +0100 Subject: CID-503 Checker: REVERSE_INULL Function: LLOutfitsList::refreshList(const LLUUID &) File: /indra/newview/lloutfitslist.cpp --- indra/newview/lloutfitslist.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 51f9a03a9c..a0ef43ea80 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -439,6 +439,7 @@ void LLOutfitsList::refreshList(const LLUUID& category_id) static LLXMLNodePtr accordionXmlNode = getAccordionTabXMLNode(); LLAccordionCtrlTab* tab = LLUICtrlFactory::defaultBuilder(accordionXmlNode, NULL, NULL); + if (!tab) continue; tab->setName(name); tab->setTitle(name); @@ -455,10 +456,7 @@ void LLOutfitsList::refreshList(const LLUUID& category_id) mAccordion->removeCollapsibleCtrl(tab); // kill removed tab - if (tab != NULL) - { - tab->die(); - } + tab->die(); continue; } -- cgit v1.2.3