From cccde14f9b2eb66cd9bea00d7e3843bca498a715 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 15 Apr 2015 13:16:23 +0300 Subject: MAINT-5058 FIXED Get the query string by simple extracting it from whole url. --- indra/llui/llurlentry.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index e18d7405ab..344791f491 100755 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -204,10 +204,10 @@ std::string LLUrlEntryBase::urlToGreyQuery(const std::string &url) const { LLUriParser up(unescapeUrl(url)); - std::string query; + std::string label; up.extractParts(); - up.glueSecond(query); - + up.glueFirst(label); + std::string query = url.substr(label.size()); return query; } -- cgit v1.2.3 From dd4f3c90797339fff98d92edeb5d7815fe8e32ed Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 15 Apr 2015 13:29:13 +0300 Subject: MAINT-5072 FIXED snapshot window in snapshot --- indra/newview/llsnapshotlivepreview.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index 234e922104..f0377b3fa7 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -194,8 +194,9 @@ void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail // Stop shining animation. mShineAnimTimer.stop(); + mSnapshotDelayTimer.setTimerExpirySec(delay); mSnapshotDelayTimer.start(); - mSnapshotDelayTimer.setTimerExpirySec(delay); + mPosTakenGlobal = gAgentCamera.getCameraPositionGlobal(); -- cgit v1.2.3 From 2b9be2ac8c046fac069b20cf110b14ceb5f43d89 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 17 Apr 2015 11:52:29 +0300 Subject: MAINT-4784 FIXED Don't clear destination beacon, when text is unchanged in input boxes. --- indra/llui/llsearcheditor.cpp | 13 +++++++++++++ indra/llui/llsearcheditor.h | 2 ++ indra/newview/llfloaterworldmap.cpp | 6 +++--- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp index ea96fc573d..1fdd05a11c 100755 --- a/indra/llui/llsearcheditor.cpp +++ b/indra/llui/llsearcheditor.cpp @@ -29,6 +29,7 @@ #include "linden_common.h" #include "llsearcheditor.h" +#include "llkeyboard.h" LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p) : LLUICtrl(p), @@ -166,4 +167,16 @@ void LLSearchEditor::handleKeystroke() { mKeystrokeCallback(this, getValue()); } + + KEY key = gKeyboard->currentKey(); + if (key == KEY_LEFT || + key == KEY_RIGHT) + { + return; + } + + if (mTextChangedCallback) + { + mTextChangedCallback(this, getValue()); + } } diff --git a/indra/llui/llsearcheditor.h b/indra/llui/llsearcheditor.h index c2d7916938..3b12868225 100755 --- a/indra/llui/llsearcheditor.h +++ b/indra/llui/llsearcheditor.h @@ -82,12 +82,14 @@ public: virtual void setFocus( BOOL b ); void setKeystrokeCallback( commit_callback_t cb ) { mKeystrokeCallback = cb; } + void setTextChangedCallback( commit_callback_t cb ) { mTextChangedCallback = cb; } protected: void onClearButtonClick(const LLSD& data); virtual void handleKeystroke(); commit_callback_t mKeystrokeCallback; + commit_callback_t mTextChangedCallback; LLLineEditor* mSearchEditor; LLButton* mSearchButton; LLButton* mClearButton; diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 6837f6159f..250f8e557f 100755 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -284,12 +284,12 @@ BOOL LLFloaterWorldMap::postBuild() LLComboBox *avatar_combo = getChild("friend combo"); avatar_combo->selectFirstItem(); avatar_combo->setPrearrangeCallback( boost::bind(&LLFloaterWorldMap::onAvatarComboPrearrange, this) ); - avatar_combo->setTextEntryCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) ); + avatar_combo->setTextChangedCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) ); mListFriendCombo = dynamic_cast(avatar_combo); LLSearchEditor *location_editor = getChild("location"); location_editor->setFocusChangedCallback(boost::bind(&LLFloaterWorldMap::onLocationFocusChanged, this, _1)); - location_editor->setKeystrokeCallback( boost::bind(&LLFloaterWorldMap::onSearchTextEntry, this)); + location_editor->setTextChangedCallback( boost::bind(&LLFloaterWorldMap::onSearchTextEntry, this)); getChild("search_results")->setDoubleClickCallback( boost::bind(&LLFloaterWorldMap::onClickTeleportBtn, this)); mListSearchResults = childGetListInterface("search_results"); @@ -297,7 +297,7 @@ BOOL LLFloaterWorldMap::postBuild() LLComboBox *landmark_combo = getChild( "landmark combo"); landmark_combo->selectFirstItem(); landmark_combo->setPrearrangeCallback( boost::bind(&LLFloaterWorldMap::onLandmarkComboPrearrange, this) ); - landmark_combo->setTextEntryCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) ); + landmark_combo->setTextChangedCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) ); mListLandmarkCombo = dynamic_cast(landmark_combo); mCurZoomVal = log(LLWorldMapView::sMapScale)/log(2.f); -- cgit v1.2.3 From 48bc511e59d5f9f15cbd1344c05fdc61d94365bb Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 21 Apr 2015 11:48:51 +0300 Subject: MAINT-2567 FIXED Don't show any notification if message is actually empty. --- indra/newview/llviewermessage.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 99c7673f85..a5a2a4d388 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3789,11 +3789,15 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) } } - LLSD msg_notify = LLSD(LLSD::emptyMap()); - msg_notify["session_id"] = LLUUID(); - msg_notify["from_id"] = chat.mFromID; - msg_notify["source_type"] = chat.mSourceType; - on_new_message(msg_notify); + if (mesg != "") + { + LLSD msg_notify = LLSD(LLSD::emptyMap()); + msg_notify["session_id"] = LLUUID(); + msg_notify["from_id"] = chat.mFromID; + msg_notify["source_type"] = chat.mSourceType; + on_new_message(msg_notify); + } + } } -- cgit v1.2.3 From 0f9ed81563ec8a0e6e2b61fb5a469c2350c794c6 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 23 Apr 2015 11:55:50 +0300 Subject: MAINT-5127 FIXED Just remove nonprintable characters from the string. --- indra/newview/llslurl.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp index 3a82233320..ac17632562 100755 --- a/indra/newview/llslurl.cpp +++ b/indra/newview/llslurl.cpp @@ -271,7 +271,14 @@ LLSLURL::LLSLURL(const std::string& slurl) // at this point, head of the path array should be [ , , , ] where x, y and z // are collectively optional // are optional + mRegion = LLURI::unescape(path_array[0].asString()); + + if(LLStringUtil::containsNonprintable(mRegion)) + { + LLStringUtil::stripNonprintable(mRegion); + } + path_array.erase(0); // parse the x, y, and optionally z -- cgit v1.2.3 From dd42e27400cf7838bf9628abef76eb32c4150097 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 24 Apr 2015 13:06:35 +0300 Subject: MAINT-2577 FIXED Cannot detach wearables by pressing Enter in inventory --- indra/newview/llinventorybridge.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 1dc5558555..a160d88b7d 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -5673,12 +5673,8 @@ void LLWearableBridge::performAction(LLInventoryModel* model, std::string action void LLWearableBridge::openItem() { - LLViewerInventoryItem* item = getItem(); - - if (item) - { - LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel()); - } + performAction(getInventoryModel(), + get_is_item_worn(mUUID) ? "take_off" : "wear"); } void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) -- cgit v1.2.3 From ce0c4853f1174aaed895da1a667ea5b0e413dcf7 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 27 Apr 2015 11:32:39 +0300 Subject: MAINT-1237 FIXED WorldMap does not Show Land For Sale-price tags for Zindra-Continent Adult Mainland properties --- indra/newview/llworldmap.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llworldmap.cpp b/indra/newview/llworldmap.cpp index bfae142812..837b30586b 100755 --- a/indra/newview/llworldmap.cpp +++ b/indra/newview/llworldmap.cpp @@ -383,6 +383,7 @@ void LLWorldMap::reloadItems(bool force) LLWorldMapMessage::getInstance()->sendItemRequest(MAP_ITEM_MATURE_EVENT); LLWorldMapMessage::getInstance()->sendItemRequest(MAP_ITEM_ADULT_EVENT); LLWorldMapMessage::getInstance()->sendItemRequest(MAP_ITEM_LAND_FOR_SALE); + LLWorldMapMessage::getInstance()->sendItemRequest(MAP_ITEM_LAND_FOR_SALE_ADULT); } } -- cgit v1.2.3 From a89f3f29a0af37c7f3e78e38acb78f78e99dae78 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 24 Apr 2015 20:30:26 +0300 Subject: MAINT-4796 FIXED Crash in LLModelLoader::loadFromSLM --- indra/newview/llfloatermodelpreview.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 3f62d94dae..005c6999c3 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -2232,10 +2232,15 @@ bool LLModelLoader::loadFromSLM(const std::string& filename) for (U32 lod = 0; lod < LLModel::NUM_LODS; ++lod) { - if (!model[lod].empty()) + if (model[lod].size() > idx) { instance_list[i].mLOD[lod] = model[lod][idx]; } + else if (!model[lod].empty()) + { + // slm load failed - indexes are corrupted + return false; + } } instance_list[i].mModel = model[LLModel::LOD_HIGH][idx]; -- cgit v1.2.3 From d05107193b03fc4b035975bae99710d0167ce0ad Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 27 Apr 2015 16:00:32 +0300 Subject: MAINT-5062 FIXED Non-default UI sizing breaks scroll bar functions --- indra/newview/llmediactrl.cpp | 19 ++++++++++++++++--- indra/newview/llmediactrl.h | 3 ++- indra/newview/llviewermedia.h | 1 + 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index b96bdd73ff..cd3d0cdbf2 100755 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -95,6 +95,7 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) : mStretchToFill( true ), mMaintainAspectRatio ( true ), mDecoupleTextureSize ( false ), + mUpdateScrolls( false ), mTextureWidth ( 1024 ), mTextureHeight ( 1024 ), mClearCache(false), @@ -682,7 +683,13 @@ bool LLMediaCtrl::ensureMediaSourceExists() mMediaSource->addObserver( this ); mMediaSource->setBackgroundColor( getBackgroundColor() ); mMediaSource->setTrustedBrowser(mTrusted); - mMediaSource->setPageZoomFactor( LLUI::getScaleFactor().mV[ VX ] ); + + F32 scale_factor = LLUI::getScaleFactor().mV[ VX ]; + if (scale_factor != mMediaSource->getPageZoomFactor()) + { + mMediaSource->setPageZoomFactor( scale_factor ); + mUpdateScrolls = true; + } if(mClearCache) { @@ -720,10 +727,11 @@ void LLMediaCtrl::draw() { F32 alpha = getDrawContext().mAlpha; - if ( gRestoreGL == 1 ) + if ( gRestoreGL == 1 || mUpdateScrolls) { LLRect r = getRect(); reshape( r.getWidth(), r.getHeight(), FALSE ); + mUpdateScrolls = false; return; } @@ -765,7 +773,12 @@ void LLMediaCtrl::draw() { gGL.pushUIMatrix(); { - mMediaSource->setPageZoomFactor( LLUI::getScaleFactor().mV[ VX ] ); + F32 scale_factor = LLUI::getScaleFactor().mV[ VX ]; + if (scale_factor != mMediaSource->getPageZoomFactor()) + { + mMediaSource->setPageZoomFactor( scale_factor ); + mUpdateScrolls = true; + } // scale texture to fit the space using texture coords gGL.getTexUnit(0)->bind(media_texture); diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index 785c57b78a..988733b85a 100755 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -192,7 +192,8 @@ public: mHidingInitialLoad, mClearCache, mHoverTextChanged, - mDecoupleTextureSize; + mDecoupleTextureSize, + mUpdateScrolls; std::string mHomePageUrl, mHomePageMimeType, diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 6803adfaa2..1ce42e97b8 100755 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -248,6 +248,7 @@ public: void setHomeURL(const std::string& home_url, const std::string& mime_type = LLStringUtil::null) { mHomeURL = home_url; mHomeMimeType = mime_type;}; void clearCache(); void setPageZoomFactor( double factor ); + double getPageZoomFactor() {return mZoomFactor;} std::string getMimeType() { return mMimeType; } void scaleMouse(S32 *mouse_x, S32 *mouse_y); void scaleTextureCoords(const LLVector2& texture_coords, S32 *x, S32 *y); -- cgit v1.2.3 From 9b0763516352f60e8532d0fa177b76fd96ffd582 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 29 Apr 2015 20:29:56 +0300 Subject: MAINT-839 FIXED [PUBLIC]Clicking a menu a second time does not close it. --- indra/llui/llmenugl.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 7cdbcb0621..43ceb0e4c6 100755 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -1043,7 +1043,7 @@ void LLMenuItemBranchGL::onCommit( void ) // keyboard navigation automatically propagates highlight to sub-menu // to facilitate fast menu control via jump keys - if (LLMenuGL::getKeyboardMode() && getBranch()&& !getBranch()->getHighlightedItem()) + if (LLMenuGL::getKeyboardMode() && getBranch() && !getBranch()->getHighlightedItem()) { getBranch()->highlightNextItem(NULL); } @@ -1456,7 +1456,24 @@ BOOL LLMenuItemBranchDownGL::handleMouseDown( S32 x, S32 y, MASK mask ) { // switch to mouse control mode LLMenuGL::setKeyboardMode(FALSE); - onCommit(); + + if (getVisible() && getHighlight() && getBranch()) + { + // already open - hide menu + LLMenuGL::setKeyboardMode(FALSE); + for (child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it) + { + LLView* viewp = *child_it; + if (dynamic_cast(viewp) != NULL && viewp->getVisible()) + { + viewp->setVisible(FALSE); + } + } + } + else + { + onCommit(); + } make_ui_sound("UISndClick"); return TRUE; } -- cgit v1.2.3 From 348bfc7ea3e1014b94dbcd29744e636e805d44cb Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 30 Apr 2015 15:35:15 +0300 Subject: MAINT-5155 FIXED Don't allow moving link folders to COF folder. --- indra/newview/llinventorybridge.cpp | 10 ++++++++-- indra/newview/llinventorybridge.h | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index a160d88b7d..177efc4e79 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2189,7 +2189,8 @@ int get_folder_path_length(const LLUUID& ancestor_id, const LLUUID& descendant_i BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, BOOL drop, - std::string& tooltip_msg) + std::string& tooltip_msg, + BOOL is_link) { LLInventoryModel* model = getInventoryModel(); @@ -2231,6 +2232,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, const BOOL move_is_into_trash = (mUUID == trash_id) || model->isObjectDescendentOf(mUUID, trash_id); const BOOL move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id); const BOOL move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); + const BOOL move_is_into_current_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_CURRENT_OUTFIT); const BOOL move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id); //-------------------------------------------------------------------------------- @@ -2259,6 +2261,10 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, is_movable = FALSE; // tooltip? } + if(is_movable && move_is_into_current_outfit && is_link) + { + is_movable = FALSE; + } if (is_movable && (mUUID == model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE))) { is_movable = FALSE; @@ -3635,7 +3641,7 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop, LLInventoryCategory* linked_category = gInventory.getCategory(inv_item->getLinkedUUID()); if (linked_category) { - accept = dragCategoryIntoFolder((LLInventoryCategory*)linked_category, drop, tooltip_msg); + accept = dragCategoryIntoFolder((LLInventoryCategory*)linked_category, drop, tooltip_msg, TRUE); } } else diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index f8ef15991d..4f49cb059a 100755 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -264,7 +264,7 @@ public: {} BOOL dragItemIntoFolder(LLInventoryItem* inv_item, BOOL drop, std::string& tooltip_msg); - BOOL dragCategoryIntoFolder(LLInventoryCategory* inv_category, BOOL drop, std::string& tooltip_msg); + BOOL dragCategoryIntoFolder(LLInventoryCategory* inv_category, BOOL drop, std::string& tooltip_msg, BOOL is_link = FALSE); virtual void buildDisplayName() const; -- cgit v1.2.3 From 75ffe90b0cf14559543e1719bf48fd0b397f3905 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Mon, 27 Apr 2015 18:21:39 +0300 Subject: MAINT-5042 FIXED SL Viewer Closes Unexpectedly in specific area with high RenderVolumeLODFactor - fix for review - fix in buffer overrun detector --- indra/llcommon/llmemory.cpp | 3 +-- indra/llcommon/llmemory.h | 2 +- indra/llmath/llvolume.cpp | 12 ++++++------ 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp index ae11988df8..3a8eabac09 100755 --- a/indra/llcommon/llmemory.cpp +++ b/indra/llcommon/llmemory.cpp @@ -2176,8 +2176,7 @@ void* ll_aligned_malloc_fallback( size_t size, int align ) SYSTEM_INFO sysinfo; GetSystemInfo(&sysinfo); - unsigned int for_alloc = sysinfo.dwPageSize; - while(for_alloc < size) for_alloc += sysinfo.dwPageSize; + unsigned int for_alloc = (size/sysinfo.dwPageSize + !!(size%sysinfo.dwPageSize)) * sysinfo.dwPageSize; void *p = VirtualAlloc(NULL, for_alloc+sysinfo.dwPageSize, MEM_COMMIT|MEM_RESERVE, PAGE_READWRITE); if(NULL == p) { diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h index c4c9cc0566..fd09eb9deb 100755 --- a/indra/llcommon/llmemory.h +++ b/indra/llcommon/llmemory.h @@ -97,7 +97,7 @@ template T* LL_NEXT_ALIGNED_ADDRESS_64(T* address) //------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------ // for enable buffer overrun detection predefine LL_DEBUG_BUFFER_OVERRUN in current library - // change preprocessro code to: #if 1 && defined(LL_WINDOWS) + // change preprocessor code to: #if 1 && defined(LL_WINDOWS) #if 0 && defined(LL_WINDOWS) void* ll_aligned_malloc_fallback( size_t size, int align ); diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index c2198b91a7..41ee3941ac 100755 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -5584,7 +5584,7 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) { resizeVertices(num_vertices+1); - if (!partial_build) + //if (!partial_build) { resizeIndices(num_indices+3); } @@ -5592,7 +5592,7 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) else { resizeVertices(num_vertices); - if (!partial_build) + //if (!partial_build) { resizeIndices(num_indices); } @@ -5714,10 +5714,10 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) LL_CHECK_MEMORY - if (partial_build) - { - return TRUE; - } + //if (partial_build) + //{ + // return TRUE; + //} if (mTypeMask & HOLLOW_MASK) { -- cgit v1.2.3 From 9252b411cf9b7035ae485140211187d7e253bf61 Mon Sep 17 00:00:00 2001 From: pavelk_productengine Date: Mon, 27 Apr 2015 18:10:33 +0300 Subject: MAINT-5004 FIXED Snapshots posted to Facebook at current window size are terrible quality --- indra/newview/llfloaterfacebook.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/llfloaterfacebook.cpp b/indra/newview/llfloaterfacebook.cpp index 3a2047cfef..da85d378b2 100644 --- a/indra/newview/llfloaterfacebook.cpp +++ b/indra/newview/llfloaterfacebook.cpp @@ -64,9 +64,9 @@ const std::string DEFAULT_CHECKIN_ICON_URL = "http://map.secondlife.com.s3.amazo const std::string DEFAULT_CHECKIN_QUERY_PARAMETERS = "?sourceid=slshare_checkin&utm_source=facebook&utm_medium=checkin&utm_campaign=slshare"; const std::string DEFAULT_PHOTO_QUERY_PARAMETERS = "?sourceid=slshare_photo&utm_source=facebook&utm_medium=photo&utm_campaign=slshare"; -const S32 MAX_QUALITY = 100; // Max quality value for jpeg images -const S32 MIN_QUALITY = 0; // Min quality value for jpeg images -const S32 TARGET_DATA_SIZE = 95000; // Size of the image (compressed) we're trying to send to Facebook +const S32 MAX_QUALITY = 100; // Max quality value for jpeg images +const S32 MIN_QUALITY = 0; // Min quality value for jpeg images +const S32 TARGET_DATA_SIZE = 950000; // Size of the image (compressed) we're trying to send to Facebook std::string get_map_url() { -- cgit v1.2.3 From eb70b5e7e016c1f767461a7266b9fa56603627d2 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 5 May 2015 11:21:08 +0300 Subject: MAINT-5170 FIXED Show info for all faces in one notification. --- indra/newview/llviewermenu.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 9d680e23d1..6d7a8008ba 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7078,11 +7078,10 @@ void handle_selected_texture_info(void*) { msg.append( llformat("%d ", (S32)(it->second[i]))); } - - LLSD args; - args["MESSAGE"] = msg; - LLNotificationsUtil::add("SystemMessage", args); } + LLSD args; + args["MESSAGE"] = msg; + LLNotificationsUtil::add("SystemMessage", args); } } -- cgit v1.2.3 From c3affc4d6b514d1c0ce9e22c11c9c16334b9b375 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Tue, 5 May 2015 21:05:13 +0300 Subject: Hotfix for build on OSX with -Werror,-Wtautological-compare --- indra/llimage/llimage.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index 7645034bd9..08462c7834 100755 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -197,9 +197,7 @@ private: { pos = val >> 16; - if (pos < 0) - vp[j] = 0; - else if (pos >= (srcSz - 1)) + if (pos >= (srcSz - 1)) vp[j] = 0; else vp[j] = (val >> 8) - ((val >> 8) & 0xffffff00); -- cgit v1.2.3 From 2bedf20aa9e03bc4a18c3a1460040b1dd7638ed9 Mon Sep 17 00:00:00 2001 From: pavelkproductengine Date: Wed, 6 May 2015 16:55:32 +0300 Subject: Fixed Mac build after tools update - stripped unsused symbols --- indra/newview/llfloatersnapshot.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index bf127102c1..185765e390 100755 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -56,7 +56,6 @@ LLSnapshotFloaterView* gSnapshotFloaterView = NULL; const F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f; -const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512 static LLDefaultChildRegistry::Register r("snapshot_floater_view"); -- cgit v1.2.3 From e92e72ff3a2c0d0d95cb866f9567a2146bc8dbfa Mon Sep 17 00:00:00 2001 From: pavelk_productengine Date: Fri, 24 Apr 2015 23:24:44 +0300 Subject: MAINT-5106 FIXED [MAC] if SL viewer is not running, clicking on SLURL launches viewer, BUT start location is not set --- indra/llwindow/llwindowmacosx-objc.h | 1 + indra/newview/llappviewermacosx.cpp | 50 +++++++++++++++++++++++------------- 2 files changed, 33 insertions(+), 18 deletions(-) diff --git a/indra/llwindow/llwindowmacosx-objc.h b/indra/llwindow/llwindowmacosx-objc.h index f02052ca6a..e6e8f27f53 100755 --- a/indra/llwindow/llwindowmacosx-objc.h +++ b/indra/llwindow/llwindowmacosx-objc.h @@ -53,6 +53,7 @@ bool runMainLoop(); void initMainLoop(); void cleanupViewer(); void handleUrl(const char* url); +void dispatchUrl(std::string url); /* Defined in llwindowmacosx-objc.mm: */ int createNSApp(int argc, const char **argv); diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index 56154a2de3..09227806fd 100755 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -62,9 +62,10 @@ namespace // They are not used immediately by the app. int gArgC; char** gArgV; - LLAppViewerMacOSX* gViewerAppPtr; + LLAppViewerMacOSX* gViewerAppPtr = NULL; void (*gOldTerminateHandler)() = NULL; + std::string gHandleSLURL; } static void exceptionTerminateHandler() @@ -107,7 +108,11 @@ bool initViewer() { LL_WARNS() << "Application init failed." << LL_ENDL; } - + else if (!gHandleSLURL.empty()) + { + dispatchUrl(gHandleSLURL); + gHandleSLURL = ""; + } return ok; } @@ -393,22 +398,31 @@ bool LLAppViewerMacOSX::getMasterSystemAudioMute() void handleUrl(const char* url_utf8) { - if (url_utf8) + if (url_utf8 && gViewerAppPtr) { - std::string url = url_utf8; - // Safari 3.2 silently mangles secondlife:///app/ URLs into - // secondlife:/app/ (only one leading slash). - // Fix them up to meet the URL specification. JC - const std::string prefix = "secondlife:/app/"; - std::string test_prefix = url.substr(0, prefix.length()); - LLStringUtil::toLower(test_prefix); - if (test_prefix == prefix) - { - url.replace(0, prefix.length(), "secondlife:///app/"); - } - - LLMediaCtrl* web = NULL; - const bool trusted_browser = false; - LLURLDispatcher::dispatch(url, "", web, trusted_browser); + gHandleSLURL = ""; + dispatchUrl(url_utf8); } + else if (url_utf8) + { + gHandleSLURL = url_utf8; + } +} + +void dispatchUrl(std::string url) +{ + // Safari 3.2 silently mangles secondlife:///app/ URLs into + // secondlife:/app/ (only one leading slash). + // Fix them up to meet the URL specification. JC + const std::string prefix = "secondlife:/app/"; + std::string test_prefix = url.substr(0, prefix.length()); + LLStringUtil::toLower(test_prefix); + if (test_prefix == prefix) + { + url.replace(0, prefix.length(), "secondlife:///app/"); + } + + LLMediaCtrl* web = NULL; + const bool trusted_browser = false; + LLURLDispatcher::dispatch(url, "", web, trusted_browser); } -- cgit v1.2.3 From 4769fbbea1f75c4f7bb42da8f29064fe26ff9e01 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 7 May 2015 12:46:04 +0300 Subject: MAINT-899 FIXED Handle location url on aditi grid same as on main grid. --- indra/newview/llurllineeditorctrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llurllineeditorctrl.cpp b/indra/newview/llurllineeditorctrl.cpp index cad5769042..8a61114852 100755 --- a/indra/newview/llurllineeditorctrl.cpp +++ b/indra/newview/llurllineeditorctrl.cpp @@ -84,7 +84,7 @@ void LLURLLineEditor::copyEscapedURLToClipboard() const std::string unescaped_text = wstring_to_utf8str(mText.getWString().substr(left_pos, length)); LLWString text_to_copy; // *HACK: Because LLSLURL is currently broken we cannot use it to check if unescaped_text is a valid SLURL (see EXT-8335). - if (LLStringUtil::startsWith(unescaped_text, "http://")) // SLURL + if (LLStringUtil::startsWith(unescaped_text, "http://") || LLStringUtil::startsWith(unescaped_text, "secondlife://")) // SLURL text_to_copy = utf8str_to_wstring(LLWeb::escapeURL(unescaped_text)); else // human-readable location text_to_copy = utf8str_to_wstring(unescaped_text); -- cgit v1.2.3 From 91304d3477d433bdf15d19ce08a5b54479634bcd Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 7 May 2015 16:22:44 +0300 Subject: MAINT-4812 Restore sending snapshot as email from the viewer. --- indra/newview/CMakeLists.txt | 1 + indra/newview/llfloatersnapshot.cpp | 30 ++- indra/newview/llfloatersnapshot.h | 1 + indra/newview/llpanelsnapshotoptions.cpp | 7 + indra/newview/llpanelsnapshotpostcard.cpp | 244 +++++++++++++++++++++ indra/newview/llsnapshotlivepreview.cpp | 2 +- indra/newview/llsnapshotlivepreview.h | 2 +- indra/newview/llviewermessage.cpp | 1 + .../default/xui/de/panel_snapshot_postcard.xml | 21 ++ .../skins/default/xui/en/floater_snapshot.xml | 6 + .../default/xui/en/panel_snapshot_options.xml | 17 ++ .../default/xui/en/panel_snapshot_postcard.xml | 103 +++++++++ .../default/xui/es/panel_snapshot_postcard.xml | 18 ++ .../default/xui/fr/panel_snapshot_postcard.xml | 18 ++ .../default/xui/it/panel_snapshot_postcard.xml | 18 ++ .../default/xui/ja/panel_snapshot_postcard.xml | 18 ++ .../default/xui/pt/panel_snapshot_postcard.xml | 18 ++ .../default/xui/ru/panel_snapshot_postcard.xml | 18 ++ .../default/xui/tr/panel_snapshot_postcard.xml | 18 ++ .../default/xui/zh/panel_snapshot_postcard.xml | 18 ++ 20 files changed, 575 insertions(+), 4 deletions(-) create mode 100755 indra/newview/llpanelsnapshotpostcard.cpp create mode 100755 indra/newview/skins/default/xui/de/panel_snapshot_postcard.xml create mode 100755 indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml create mode 100755 indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml create mode 100755 indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml create mode 100755 indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml create mode 100755 indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml create mode 100755 indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml create mode 100755 indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml create mode 100755 indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml create mode 100755 indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 3d7fd5bc5e..13040ea423 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -464,6 +464,7 @@ set(viewer_SOURCE_FILES llpanelsnapshotinventory.cpp llpanelsnapshotlocal.cpp llpanelsnapshotoptions.cpp + llpanelsnapshotpostcard.cpp llpanelsnapshotprofile.cpp llpanelteleporthistory.cpp llpaneltiptoast.cpp diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 185765e390..16fa4684ab 100755 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -56,6 +56,7 @@ LLSnapshotFloaterView* gSnapshotFloaterView = NULL; const F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f; +const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512 static LLDefaultChildRegistry::Register r("snapshot_floater_view"); @@ -168,7 +169,11 @@ LLSnapshotLivePreview::ESnapshotType LLFloaterSnapshot::Impl::getActiveSnapshotT name = spanel->getName(); } - if (name == "panel_snapshot_inventory") + if (name == "panel_snapshot_postcard") + { + type = LLSnapshotLivePreview::SNAPSHOT_POSTCARD; + } + else if (name == "panel_snapshot_inventory") { type = LLSnapshotLivePreview::SNAPSHOT_TEXTURE; } @@ -419,6 +424,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) } LLSnapshotLivePreview* previewp = getPreviewView(floater); + BOOL got_bytes = previewp && previewp->getDataSize() > 0; BOOL got_snap = previewp && previewp->getSnapshotUpToDate(); // *TODO: Separate maximum size for Web images from postcards @@ -441,7 +447,10 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) } floater->getChild("file_size_label")->setTextArg("[SIZE]", got_snap ? bytes_string : floater->getString("unknown")); - floater->getChild("file_size_label")->setColor(LLUIColorTable::instance().getColor( "LabelTextColor" )); + floater->getChild("file_size_label")->setColor( + shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD + && got_bytes + && previewp->getDataSize() > MAX_POSTCARD_DATASIZE ? LLUIColor(LLColor4::red) : LLUIColorTable::instance().getColor( "LabelTextColor" )); // Update the width and height spinners based on the corresponding resolution combos. (?) switch(shot_type) @@ -451,6 +460,11 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) floater->getChild("layer_types")->setValue("colors"); setResolution(floater, "profile_size_combo"); break; + case LLSnapshotLivePreview::SNAPSHOT_POSTCARD: + layer_type = LLViewerWindow::SNAPSHOT_TYPE_COLOR; + floater->getChild("layer_types")->setValue("colors"); + setResolution(floater, "postcard_size_combo"); + break; case LLSnapshotLivePreview::SNAPSHOT_TEXTURE: layer_type = LLViewerWindow::SNAPSHOT_TYPE_COLOR; floater->getChild("layer_types")->setValue("colors"); @@ -1446,6 +1460,18 @@ const LLVector3d& LLFloaterSnapshot::getPosTakenGlobal() return previewp->getPosTakenGlobal(); } +// static +void LLFloaterSnapshot::setAgentEmail(const std::string& email) +{ + LLFloaterSnapshot* instance = findInstance(); + if (instance) + { + LLSideTrayPanelContainer* panel_container = instance->getChild("panel_container"); + LLPanel* postcard_panel = panel_container->getPanelByName("panel_snapshot_postcard"); + postcard_panel->notify(LLSD().with("agent-email", email)); + } +} + ///---------------------------------------------------------------------------- /// Class LLSnapshotFloaterView ///---------------------------------------------------------------------------- diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h index 5bcf1d3099..0bb9474bb5 100755 --- a/indra/newview/llfloatersnapshot.h +++ b/indra/newview/llfloatersnapshot.h @@ -63,6 +63,7 @@ public: static void postPanelSwitch(); static LLPointer getImageData(); static const LLVector3d& getPosTakenGlobal(); + static void setAgentEmail(const std::string& email); static const LLRect& getThumbnailPlaceholderRect() { return sThumbnailPlaceholder->getRect(); } diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp index f41bdd8881..0fc9ceec83 100755 --- a/indra/newview/llpanelsnapshotoptions.cpp +++ b/indra/newview/llpanelsnapshotoptions.cpp @@ -56,6 +56,7 @@ private: void updateUploadCost(); void openPanel(const std::string& panel_name); void onSaveToProfile(); + void onSaveToEmail(); void onSaveToInventory(); void onSaveToComputer(); void onSendToFacebook(); @@ -68,6 +69,7 @@ static LLPanelInjector panel_class("llpanelsnapshotoptio LLPanelSnapshotOptions::LLPanelSnapshotOptions() { mCommitCallbackRegistrar.add("Snapshot.SaveToProfile", boost::bind(&LLPanelSnapshotOptions::onSaveToProfile, this)); + mCommitCallbackRegistrar.add("Snapshot.SaveToEmail", boost::bind(&LLPanelSnapshotOptions::onSaveToEmail, this)); mCommitCallbackRegistrar.add("Snapshot.SaveToInventory", boost::bind(&LLPanelSnapshotOptions::onSaveToInventory, this)); mCommitCallbackRegistrar.add("Snapshot.SaveToComputer", boost::bind(&LLPanelSnapshotOptions::onSaveToComputer, this)); mCommitCallbackRegistrar.add("Snapshot.SendToFacebook", boost::bind(&LLPanelSnapshotOptions::onSendToFacebook, this)); @@ -118,6 +120,11 @@ void LLPanelSnapshotOptions::onSaveToProfile() openPanel("panel_snapshot_profile"); } +void LLPanelSnapshotOptions::onSaveToEmail() +{ + openPanel("panel_snapshot_postcard"); +} + void LLPanelSnapshotOptions::onSaveToInventory() { openPanel("panel_snapshot_inventory"); diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp new file mode 100755 index 0000000000..8e37b1418c --- /dev/null +++ b/indra/newview/llpanelsnapshotpostcard.cpp @@ -0,0 +1,244 @@ +/** + * @file llpanelsnapshotpostcard.cpp + * @brief Postcard sending panel. + * + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llcombobox.h" +#include "llnotificationsutil.h" +#include "llsidetraypanelcontainer.h" +#include "llsliderctrl.h" +#include "llspinctrl.h" +#include "lltexteditor.h" + +#include "llagent.h" +#include "llagentui.h" +#include "llfloatersnapshot.h" // FIXME: replace with a snapshot storage model +#include "llpanelsnapshot.h" +#include "llpostcard.h" +#include "llviewercontrol.h" // gSavedSettings +#include "llviewerwindow.h" + +#include + +/** + * Sends postcard via email. + */ +class LLPanelSnapshotPostcard +: public LLPanelSnapshot +{ + LOG_CLASS(LLPanelSnapshotPostcard); + +public: + LLPanelSnapshotPostcard(); + /*virtual*/ BOOL postBuild(); + /*virtual*/ void onOpen(const LLSD& key); + /*virtual*/ S32 notify(const LLSD& info); + +private: + /*virtual*/ std::string getWidthSpinnerName() const { return "postcard_snapshot_width"; } + /*virtual*/ std::string getHeightSpinnerName() const { return "postcard_snapshot_height"; } + /*virtual*/ std::string getAspectRatioCBName() const { return "postcard_keep_aspect_check"; } + /*virtual*/ std::string getImageSizeComboName() const { return "postcard_size_combo"; } + /*virtual*/ std::string getImageSizePanelName() const { return "postcard_image_size_lp"; } + /*virtual*/ LLFloaterSnapshot::ESnapshotFormat getImageFormat() const { return LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG; } + /*virtual*/ void updateControls(const LLSD& info); + + bool missingSubjMsgAlertCallback(const LLSD& notification, const LLSD& response); + void sendPostcard(); + + void onMsgFormFocusRecieved(); + void onFormatComboCommit(LLUICtrl* ctrl); + void onQualitySliderCommit(LLUICtrl* ctrl); + void onSend(); + + bool mHasFirstMsgFocus; + std::string mAgentEmail; +}; + +static LLPanelInjector panel_class("llpanelsnapshotpostcard"); + +LLPanelSnapshotPostcard::LLPanelSnapshotPostcard() +: mHasFirstMsgFocus(false) +{ + mCommitCallbackRegistrar.add("Postcard.Send", boost::bind(&LLPanelSnapshotPostcard::onSend, this)); + mCommitCallbackRegistrar.add("Postcard.Cancel", boost::bind(&LLPanelSnapshotPostcard::cancel, this)); + +} + +// virtual +BOOL LLPanelSnapshotPostcard::postBuild() +{ + // pick up the user's up-to-date email address + gAgent.sendAgentUserInfoRequest(); + + std::string name_string; + LLAgentUI::buildFullname(name_string); + getChild("name_form")->setValue(LLSD(name_string)); + + // For the first time a user focuses to .the msg box, all text will be selected. + getChild("msg_form")->setFocusChangedCallback(boost::bind(&LLPanelSnapshotPostcard::onMsgFormFocusRecieved, this)); + + getChild("to_form")->setFocus(TRUE); + + getChild("image_quality_slider")->setCommitCallback(boost::bind(&LLPanelSnapshotPostcard::onQualitySliderCommit, this, _1)); + + return LLPanelSnapshot::postBuild(); +} + +// virtual +void LLPanelSnapshotPostcard::onOpen(const LLSD& key) +{ + LLPanelSnapshot::onOpen(key); +} + +// virtual +S32 LLPanelSnapshotPostcard::notify(const LLSD& info) +{ + if (!info.has("agent-email")) + { + llassert(info.has("agent-email")); + return 0; + } + + if (mAgentEmail.empty()) + { + mAgentEmail = info["agent-email"].asString(); + } + + return 1; +} + +// virtual +void LLPanelSnapshotPostcard::updateControls(const LLSD& info) +{ + getChild("image_quality_slider")->setValue(gSavedSettings.getS32("SnapshotQuality")); + updateImageQualityLevel(); + + const bool have_snapshot = info.has("have-snapshot") ? info["have-snapshot"].asBoolean() : true; + getChild("send_btn")->setEnabled(have_snapshot); +} + +bool LLPanelSnapshotPostcard::missingSubjMsgAlertCallback(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if(0 == option) + { + // User clicked OK + if((getChild("subject_form")->getValue().asString()).empty()) + { + // Stuff the subject back into the form. + getChild("subject_form")->setValue(getString("default_subject")); + } + + if (!mHasFirstMsgFocus) + { + // The user never switched focus to the message window. + // Using the default string. + getChild("msg_form")->setValue(getString("default_message")); + } + + sendPostcard(); + } + return false; +} + + +void LLPanelSnapshotPostcard::sendPostcard() +{ + std::string to(getChild("to_form")->getValue().asString()); + std::string subject(getChild("subject_form")->getValue().asString()); + + LLSD postcard = LLSD::emptyMap(); + postcard["pos-global"] = LLFloaterSnapshot::getPosTakenGlobal().getValue(); + postcard["to"] = to; + postcard["from"] = mAgentEmail; + postcard["name"] = getChild("name_form")->getValue().asString(); + postcard["subject"] = subject; + postcard["msg"] = getChild("msg_form")->getValue().asString(); + LLPostCard::send(LLFloaterSnapshot::getImageData(), postcard); + + // Give user feedback of the event. + gViewerWindow->playSnapshotAnimAndSound(); + + LLFloaterSnapshot::postSave(); +} + +void LLPanelSnapshotPostcard::onMsgFormFocusRecieved() +{ + LLTextEditor* msg_form = getChild("msg_form"); + if (msg_form->hasFocus() && !mHasFirstMsgFocus) + { + mHasFirstMsgFocus = true; + msg_form->setText(LLStringUtil::null); + } +} + +void LLPanelSnapshotPostcard::onFormatComboCommit(LLUICtrl* ctrl) +{ + // will call updateControls() + LLFloaterSnapshot::getInstance()->notify(LLSD().with("image-format-change", true)); +} + +void LLPanelSnapshotPostcard::onQualitySliderCommit(LLUICtrl* ctrl) +{ + updateImageQualityLevel(); + + LLSliderCtrl* slider = (LLSliderCtrl*)ctrl; + S32 quality_val = llfloor((F32)slider->getValue().asReal()); + LLSD info; + info["image-quality-change"] = quality_val; + LLFloaterSnapshot::getInstance()->notify(info); // updates the "SnapshotQuality" setting +} + +void LLPanelSnapshotPostcard::onSend() +{ + // Validate input. + std::string to(getChild("to_form")->getValue().asString()); + + boost::regex email_format("[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}(,[ \t]*[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,})*"); + + if (to.empty() || !boost::regex_match(to, email_format)) + { + LLNotificationsUtil::add("PromptRecipientEmail"); + return; + } + + if (mAgentEmail.empty() || !boost::regex_match(mAgentEmail, email_format)) + { + LLNotificationsUtil::add("PromptSelfEmail"); + return; + } + + std::string subject(getChild("subject_form")->getValue().asString()); + if(subject.empty() || !mHasFirstMsgFocus) + { + LLNotificationsUtil::add("PromptMissingSubjMsg", LLSD(), LLSD(), boost::bind(&LLPanelSnapshotPostcard::missingSubjMsgAlertCallback, this, _1, _2)); + return; + } + + // Send postcard. + sendPostcard(); +} diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index 318d1e2861..fbbbead264 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -86,7 +86,7 @@ LLSnapshotLivePreview::LLSnapshotLivePreview (const LLSnapshotLivePreview::Param mNeedsFlash(TRUE), mSnapshotQuality(gSavedSettings.getS32("SnapshotQuality")), mDataSize(0), - mSnapshotType(SNAPSHOT_LOCAL), + mSnapshotType(SNAPSHOT_POSTCARD), mSnapshotFormat(LLFloaterSnapshot::ESnapshotFormat(gSavedSettings.getS32("SnapshotFormat"))), mSnapshotUpToDate(FALSE), mCameraPos(LLViewerCamera::getInstance()->getOrigin()), diff --git a/indra/newview/llsnapshotlivepreview.h b/indra/newview/llsnapshotlivepreview.h index f479de59d4..fed33bf37c 100644 --- a/indra/newview/llsnapshotlivepreview.h +++ b/indra/newview/llsnapshotlivepreview.h @@ -42,7 +42,7 @@ class LLSnapshotLivePreview : public LLView public: enum ESnapshotType { - SNAPSHOT_POSTCARD_DEPRECIATED, + SNAPSHOT_POSTCARD, SNAPSHOT_TEXTURE, SNAPSHOT_LOCAL, SNAPSHOT_WEB diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 092fa5501d..4e9144ac26 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -7122,6 +7122,7 @@ void process_user_info_reply(LLMessageSystem* msg, void**) msg->getString( "UserData", "DirectoryVisibility", dir_visibility); LLFloaterPreference::updateUserInfo(dir_visibility, im_via_email); + LLFloaterSnapshot::setAgentEmail(email); } diff --git a/indra/newview/skins/default/xui/de/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/de/panel_snapshot_postcard.xml new file mode 100755 index 0000000000..ead56f2885 --- /dev/null +++ b/indra/newview/skins/default/xui/de/panel_snapshot_postcard.xml @@ -0,0 +1,21 @@ + + + + Postkarte aus [SECOND_LIFE]. + + + Sehen Sie mal! + + + Senden... + + + E-Mail + + + + + + + \ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml new file mode 100755 index 0000000000..975b08be05 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml @@ -0,0 +1,103 @@ + + + + Postcard from [SECOND_LIFE]. + + + Check this out! + + + Sending... + + + + E-mail + + + + + + + + + \ No newline at end of file diff --git a/indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml new file mode 100755 index 0000000000..81a067a81b --- /dev/null +++ b/indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml @@ -0,0 +1,18 @@ + + + + Postal desde [SECOND_LIFE]. + + + ¡Mira esto! + + + Enviando... + + + Correo-e + + + + + diff --git a/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml new file mode 100755 index 0000000000..3f5ef04022 --- /dev/null +++ b/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml @@ -0,0 +1,18 @@ + + + + Carte postale de [SECOND_LIFE]. + + + Ouvrez-moi ! + + + Envoi en cours... + + + E-mail + + + + + diff --git a/indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml new file mode 100755 index 0000000000..333ce5c12b --- /dev/null +++ b/indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml @@ -0,0 +1,18 @@ + + + + Cartolina da [SECOND_LIFE]. + + + Dai un'occhiata! + + + Invio... + + + E-mail + + + + + diff --git a/indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml new file mode 100755 index 0000000000..756df9ecc2 --- /dev/null +++ b/indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml @@ -0,0 +1,18 @@ + + + + [SECOND_LIFE] からのポストカードです。 + + + ぜひご覧ください! + + + 送信中... + + + メール + + + + + diff --git a/indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml new file mode 100755 index 0000000000..efcbec66ba --- /dev/null +++ b/indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml @@ -0,0 +1,18 @@ + + + + Postal do [SECOND_LIFE]. + + + Confira! + + + Enviando... + + + E-mail + + + + + diff --git a/indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml new file mode 100755 index 0000000000..6e1b3a7516 --- /dev/null +++ b/indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml @@ -0,0 +1,18 @@ + + + + Открытка из [SECOND_LIFE]. + + + Побывай здесь! + + + Отправка... + + + Электронное письмо + + + + + diff --git a/indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml new file mode 100755 index 0000000000..9b9e60d2e0 --- /dev/null +++ b/indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml @@ -0,0 +1,18 @@ + + + + SECOND_LIFE]'dan posta kartı. + + + Buna bakın! + + + Gönderiyor... + + + E-posta + + + + + diff --git a/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml new file mode 100755 index 0000000000..6dfeaf2505 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml @@ -0,0 +1,18 @@ + + + + 來自 [SECOND_LIFE] 的明信片。 + + + 快來看看這個! + + + 傳送中... + + + 電郵 + + + + + -- cgit v1.2.3 From 9c7f424371b33d027fc58f0bf83bc30b53707bb3 Mon Sep 17 00:00:00 2001 From: MNikolenko ProductEngine Date: Thu, 7 May 2015 19:51:52 +0300 Subject: MAINT-4812 Restore sending snapshot as email from the viewer. --- indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml | 1 + indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml | 1 + indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml | 1 + indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml | 1 + indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml | 1 + indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml | 1 + indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml | 1 + indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml | 1 + 8 files changed, 8 insertions(+) diff --git a/indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml index 81a067a81b..3373c29821 100755 --- a/indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml +++ b/indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml @@ -15,4 +15,5 @@ + diff --git a/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml index 3f5ef04022..19e7b02cf8 100755 --- a/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml +++ b/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml @@ -15,4 +15,5 @@ + diff --git a/indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml index 333ce5c12b..e79e7aecbc 100755 --- a/indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml +++ b/indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml @@ -15,4 +15,5 @@ + diff --git a/indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml index 756df9ecc2..000a59117e 100755 --- a/indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml +++ b/indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml @@ -15,4 +15,5 @@ + diff --git a/indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml index efcbec66ba..08bc60996d 100755 --- a/indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml +++ b/indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml @@ -15,4 +15,5 @@ + diff --git a/indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml index 6e1b3a7516..fa8ca1f9b4 100755 --- a/indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml +++ b/indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml @@ -15,4 +15,5 @@ + diff --git a/indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml index 9b9e60d2e0..e9b36b70a7 100755 --- a/indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml +++ b/indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml @@ -15,4 +15,5 @@ + diff --git a/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml index 6dfeaf2505..a360822af5 100755 --- a/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml +++ b/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml @@ -15,4 +15,5 @@ + -- cgit v1.2.3 From a37ac9d12c8d3163806cd2be9e38ca7294757e3d Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 8 May 2015 14:01:29 +0300 Subject: MAINT-4688 FIXED Menu item names were changed. --- indra/newview/skins/default/xui/da/menu_viewer.xml | 2 +- indra/newview/skins/default/xui/de/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/en/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/es/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/fr/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/it/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/ja/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/pl/menu_viewer.xml | 2 +- indra/newview/skins/default/xui/pt/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/ru/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/tr/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/zh/menu_viewer.xml | 4 ++-- 12 files changed, 22 insertions(+), 22 deletions(-) diff --git a/indra/newview/skins/default/xui/da/menu_viewer.xml b/indra/newview/skins/default/xui/da/menu_viewer.xml index aa6bc53672..299322001b 100755 --- a/indra/newview/skins/default/xui/da/menu_viewer.xml +++ b/indra/newview/skins/default/xui/da/menu_viewer.xml @@ -37,7 +37,7 @@ - + diff --git a/indra/newview/skins/default/xui/de/menu_viewer.xml b/indra/newview/skins/default/xui/de/menu_viewer.xml index 50a6dafa91..ff051634d8 100755 --- a/indra/newview/skins/default/xui/de/menu_viewer.xml +++ b/indra/newview/skins/default/xui/de/menu_viewer.xml @@ -14,7 +14,7 @@ - + @@ -62,7 +62,7 @@ - + diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index b75d614dcc..807c4e9813 100755 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -127,7 +127,7 @@ + name="WalkRunFly"> @@ -495,7 +495,7 @@ + name="RegionEstate"> diff --git a/indra/newview/skins/default/xui/es/menu_viewer.xml b/indra/newview/skins/default/xui/es/menu_viewer.xml index 9596a8277e..ef963a60c9 100755 --- a/indra/newview/skins/default/xui/es/menu_viewer.xml +++ b/indra/newview/skins/default/xui/es/menu_viewer.xml @@ -14,7 +14,7 @@ - + @@ -61,7 +61,7 @@ - + diff --git a/indra/newview/skins/default/xui/fr/menu_viewer.xml b/indra/newview/skins/default/xui/fr/menu_viewer.xml index 2c30fe07b4..940cf6fe9c 100755 --- a/indra/newview/skins/default/xui/fr/menu_viewer.xml +++ b/indra/newview/skins/default/xui/fr/menu_viewer.xml @@ -14,7 +14,7 @@ - + @@ -62,7 +62,7 @@ - + diff --git a/indra/newview/skins/default/xui/it/menu_viewer.xml b/indra/newview/skins/default/xui/it/menu_viewer.xml index d25e11e7a4..215bdd37a5 100755 --- a/indra/newview/skins/default/xui/it/menu_viewer.xml +++ b/indra/newview/skins/default/xui/it/menu_viewer.xml @@ -14,7 +14,7 @@ - + @@ -62,7 +62,7 @@ - + diff --git a/indra/newview/skins/default/xui/ja/menu_viewer.xml b/indra/newview/skins/default/xui/ja/menu_viewer.xml index 0b85c693f0..bb65c3bb0d 100755 --- a/indra/newview/skins/default/xui/ja/menu_viewer.xml +++ b/indra/newview/skins/default/xui/ja/menu_viewer.xml @@ -14,7 +14,7 @@ - + @@ -62,7 +62,7 @@ - + diff --git a/indra/newview/skins/default/xui/pl/menu_viewer.xml b/indra/newview/skins/default/xui/pl/menu_viewer.xml index a354cca9ad..65311c134c 100755 --- a/indra/newview/skins/default/xui/pl/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pl/menu_viewer.xml @@ -37,7 +37,7 @@ - + diff --git a/indra/newview/skins/default/xui/pt/menu_viewer.xml b/indra/newview/skins/default/xui/pt/menu_viewer.xml index 0bbb9683a0..f96137cc94 100755 --- a/indra/newview/skins/default/xui/pt/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pt/menu_viewer.xml @@ -14,7 +14,7 @@ - + @@ -62,7 +62,7 @@ - + diff --git a/indra/newview/skins/default/xui/ru/menu_viewer.xml b/indra/newview/skins/default/xui/ru/menu_viewer.xml index 266a1fb877..c7acc2018b 100755 --- a/indra/newview/skins/default/xui/ru/menu_viewer.xml +++ b/indra/newview/skins/default/xui/ru/menu_viewer.xml @@ -14,7 +14,7 @@ - + @@ -60,7 +60,7 @@ - + diff --git a/indra/newview/skins/default/xui/tr/menu_viewer.xml b/indra/newview/skins/default/xui/tr/menu_viewer.xml index a488a0916f..ff260b166e 100755 --- a/indra/newview/skins/default/xui/tr/menu_viewer.xml +++ b/indra/newview/skins/default/xui/tr/menu_viewer.xml @@ -14,7 +14,7 @@ - + @@ -60,7 +60,7 @@ - + diff --git a/indra/newview/skins/default/xui/zh/menu_viewer.xml b/indra/newview/skins/default/xui/zh/menu_viewer.xml index adc29a3944..0c82776081 100755 --- a/indra/newview/skins/default/xui/zh/menu_viewer.xml +++ b/indra/newview/skins/default/xui/zh/menu_viewer.xml @@ -14,7 +14,7 @@ - + @@ -60,7 +60,7 @@ - + -- cgit v1.2.3 From 0d5d0060950b632eacd865b18af8bb5cf94732fb Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Fri, 8 May 2015 21:24:47 +0300 Subject: MAINT-5195 Text mismatch referencing Developer menu --- indra/newview/skins/default/xui/en/panel_preferences_advanced.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml index 2e778014c5..3e96160834 100755 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -216,7 +216,7 @@ control_name="QAMode" follows="top|left" height="15" - label="Show Developer Menu" + label="Show Develop Menu" layout="topleft" left="30" name="show_develop_menu_check" -- cgit v1.2.3 From 91f3bd942ade61dba00f76d7dd59ab48a7f64c04 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 7 May 2015 18:33:31 +0300 Subject: MAINT-5187 FIXED Add control for local logging of viewer stat packet contents --- indra/newview/llviewerstats.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index f60829e9e8..24a6758312 100755 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -60,6 +60,7 @@ #include "llfeaturemanager.h" #include "llviewernetwork.h" #include "llmeshrepository.h" //for LLMeshRepository::sBytesReceived +#include "llsdserialize.h" namespace LLStatViewer { @@ -616,8 +617,10 @@ void send_stats() body["DisplayNamesShowUsername"] = gSavedSettings.getBOOL("NameTagShowUsernames"); body["MinimalSkin"] = false; - + LLViewerStats::getInstance()->addToMessage(body); + + LL_INFOS("LogViewerStatsPacket") << "Sending viewer statistics: " << body << LL_ENDL; LLHTTPClient::post(url, body, new ViewerStatsResponder()); LLViewerStats::instance().getRecording().resume(); -- cgit v1.2.3 From bcf5b196fed62222559de495fed3b2f19d7a731b Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 12 May 2015 22:03:06 +0300 Subject: =?UTF-8?q?MAINT-5205=20FIXED=20=E2=80=98Share=E2=80=99=20button?= =?UTF-8?q?=20isn't=20disabled=20when=20worn=20item=20and=20few=20not=20wo?= =?UTF-8?q?rn=20items=20are=20selected?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- indra/llui/llfolderviewitem.cpp | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 747b472ac2..a369edbc6b 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -1461,31 +1461,37 @@ void LLFolderViewFolder::extendSelectionTo(LLFolderViewItem* new_selection) LLFolderView* root = getRoot(); - for (std::vector::iterator it = items_to_select_forward.begin(), end_it = items_to_select_forward.end(); + BOOL selection_reverse = new_selection->isSelected(); //indication that some elements are being deselected + + // array always go from 'will be selected' to ' will be unselected', iterate + // in opposite direction to simplify identification of 'point of origin' in + // case it is in the list we are working with + for (std::vector::reverse_iterator it = items_to_select_forward.rbegin(), end_it = items_to_select_forward.rend(); it != end_it; ++it) { LLFolderViewItem* item = *it; - if (item->isSelected()) + BOOL selected = item->isSelected(); + if (!selection_reverse && selected) { - root->removeFromSelectionList(item); + // it is our 'point of origin' where we shift/expand from + // don't deselect it + selection_reverse = TRUE; } else { - item->selectItem(); + root->changeSelection(item, !selected); } - root->addToSelectionList(item); } - if (new_selection->isSelected()) + if (selection_reverse) { - root->removeFromSelectionList(new_selection); + // at some point we reversed selection, first element should be deselected + root->changeSelection(last_selected_item_from_cur, FALSE); } - else - { - new_selection->selectItem(); - } - root->addToSelectionList(new_selection); + + // element we expand to should always be selected + root->changeSelection(new_selection, TRUE); } -- cgit v1.2.3 From 102908a2f204247005ae4a562c4f34668a983f4a Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 15 May 2015 11:43:13 +0300 Subject: MAINT-5206 FIXED always show Nearby chat on first opening of IMcontainer floater. --- indra/newview/llfloaterimcontainer.cpp | 6 +++++- indra/newview/llfloaterimcontainer.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index ab57e8c170..66278f4987 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -261,6 +261,8 @@ BOOL LLFloaterIMContainer::postBuild() mInitialized = true; + mIsFirstOpen = true; + // Add callbacks: // We'll take care of view updates on idle gIdleCallbacks.addFunction(idle, this); @@ -636,14 +638,16 @@ void LLFloaterIMContainer::setVisible(BOOL visible) { // Make sure we have the Nearby Chat present when showing the conversation container nearby_chat = LLFloaterReg::findTypedInstance("nearby_chat"); - if (nearby_chat == NULL) + if ((nearby_chat == NULL) || mIsFirstOpen) { // If not found, force the creation of the nearby chat conversation panel // *TODO: find a way to move this to XML as a default panel or something like that LLSD name("nearby_chat"); LLFloaterReg::toggleInstanceOrBringToFront(name); selectConversationPair(LLUUID(NULL), false, false); + mIsFirstOpen = false; } + flashConversationItemWidget(mSelectedSession,false); LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(mSelectedSession); diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index f21c0b9947..60cef83d9a 100755 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -193,6 +193,8 @@ private: bool mInitialized; bool mIsFirstLaunch; + bool mIsFirstOpen; + LLUUID mSelectedSession; std::string mGeneralTitle; -- cgit v1.2.3 From 496139fe56bd456b6bdc1a32726e32fd1b07631a Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Fri, 15 May 2015 06:56:05 +0300 Subject: MAINT-5096 FIXED Camming is broken in freeze frame mode once snapshot is refreshed... --- indra/newview/llsnapshotlivepreview.cpp | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index fbbbead264..abab3174cd 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -194,8 +194,8 @@ void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail // Stop shining animation. mShineAnimTimer.stop(); - mSnapshotDelayTimer.setTimerExpirySec(delay); mSnapshotDelayTimer.start(); + mSnapshotDelayTimer.resetWithExpiry(delay); mPosTakenGlobal = gAgentCamera.getCameraPositionGlobal(); @@ -671,10 +671,27 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) return FALSE; } - // If we're in freeze-frame mode and camera has moved, update snapshot. + if (previewp->mSnapshotDelayTimer.getStarted()) // Wait for a snapshot delay timer + { + if (!previewp->mSnapshotDelayTimer.hasExpired()) + { + return FALSE; + } + previewp->mSnapshotDelayTimer.stop(); + } + + if (LLToolCamera::getInstance()->hasMouseCapture()) // Hide full-screen preview while camming, either don't take snapshots while ALT-zoom active + { + previewp->setVisible(FALSE); + return FALSE; + } + + // If we're in freeze-frame and/or auto update mode and camera has moved, update snapshot. LLVector3 new_camera_pos = LLViewerCamera::getInstance()->getOrigin(); LLQuaternion new_camera_rot = LLViewerCamera::getInstance()->getQuaternion(); - if (previewp->mForceUpdateSnapshot || (gSavedSettings.getBOOL("FreezeTime") && previewp->mAllowFullScreenPreview && + if (previewp->mForceUpdateSnapshot || + (((gSavedSettings.getBOOL("AutoSnapshot") && LLView::isAvailable(previewp->mViewContainer)) || + (gSavedSettings.getBOOL("FreezeTime") && previewp->mAllowFullScreenPreview)) && (new_camera_pos != previewp->mCameraPos || dot(new_camera_rot, previewp->mCameraRot) < 0.995f))) { previewp->mCameraPos = new_camera_pos; @@ -689,11 +706,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) previewp->mForceUpdateSnapshot = FALSE; } - // see if it's time yet to snap the shot and bomb out otherwise. - previewp->mSnapshotActive = - (previewp->mSnapshotDelayTimer.getStarted() && previewp->mSnapshotDelayTimer.hasExpired()) - && !LLToolCamera::getInstance()->hasMouseCapture(); // don't take snapshots while ALT-zoom active - if (!previewp->mSnapshotActive && previewp->getSnapshotUpToDate() && previewp->getThumbnailUpToDate()) + if (previewp->getSnapshotUpToDate() && previewp->getThumbnailUpToDate()) { return FALSE; } @@ -707,6 +720,8 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) previewp->mPreviewImage = new LLImageRaw; } + previewp->mSnapshotActive = TRUE; + previewp->setVisible(FALSE); previewp->setEnabled(FALSE); @@ -778,7 +793,6 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) } previewp->getWindow()->decBusyCount(); previewp->setVisible(gSavedSettings.getBOOL("UseFreezeFrame") && previewp->mAllowFullScreenPreview); // only show fullscreen preview when in freeze frame mode - previewp->mSnapshotDelayTimer.stop(); previewp->mSnapshotActive = FALSE; LL_DEBUGS() << "done creating snapshot" << LL_ENDL; } -- cgit v1.2.3 From 76872412a26911e37bd13602ca6c29885dfd0f11 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Tue, 19 May 2015 00:44:43 +0300 Subject: MAINT-5138 FIXED Second Life Viewer's window title is "Second Life " with a trailing space --- indra/newview/llappviewer.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 6dc71bc94e..5a5d2eb744 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2783,10 +2783,12 @@ bool LLAppViewer::initConfiguration() // gWindowTitle = LLTrans::getString("APP_NAME"); #if LL_DEBUG - gWindowTitle += std::string(" [DEBUG] ") + gArgs; -#else - gWindowTitle += std::string(" ") + gArgs; + gWindowTitle += std::string(" [DEBUG]") #endif + if (!gArgs.empty()) + { + gWindowTitle += std::string(" ") + gArgs; + } LLStringUtil::truncate(gWindowTitle, 255); //RN: if we received a URL, hand it off to the existing instance. -- cgit v1.2.3 From 193a298266c251a6be153cf37f5b2d2aa8513101 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 19 May 2015 12:01:32 +0300 Subject: MAINT-5201 FIXED 'Chat history' option in context menu does not works for multiperson chat. --- indra/newview/llconversationlog.h | 3 ++- indra/newview/llfloaterimcontainer.cpp | 26 +++++++++++++++++++++++++- indra/newview/lllogchat.cpp | 16 ++++++++++++++++ indra/newview/lllogchat.h | 1 + 4 files changed, 44 insertions(+), 2 deletions(-) diff --git a/indra/newview/llconversationlog.h b/indra/newview/llconversationlog.h index b38d472156..62f08144b9 100755 --- a/indra/newview/llconversationlog.h +++ b/indra/newview/llconversationlog.h @@ -153,6 +153,7 @@ public: * file name is conversation.log */ std::string getFileName(); + LLConversation* findConversation(const LLIMModel::LLIMSession* session); private: @@ -184,7 +185,7 @@ private: void updateConversationName(const LLIMModel::LLIMSession* session, const std::string& name); void updateOfflineIMs(const LLIMModel::LLIMSession* session, BOOL new_messages); - LLConversation* findConversation(const LLIMModel::LLIMSession* session); + typedef std::vector conversations_vec_t; std::vector mConversations; diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 66278f4987..04f8c09ca0 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1220,7 +1220,22 @@ void LLFloaterIMContainer::doToSelectedConversation(const std::string& command, { if (selectedIDS.size() > 0) { - LLAvatarActions::viewChatHistory(selectedIDS.front()); + if(conversationItem->getType() == LLConversationItem::CONV_SESSION_GROUP) + { + LLFloaterReg::showInstance("preview_conversation", conversationItem->getUUID(), true); + } + else if(conversationItem->getType() == LLConversationItem::CONV_SESSION_AD_HOC) + { + LLConversation* conv = LLConversationLog::instance().findConversation(LLIMModel::getInstance()->findIMSession(conversationItem->getUUID())); + if(conv) + { + LLFloaterReg::showInstance("preview_conversation", conv->getSessionID(), true); + } + } + else + { + LLAvatarActions::viewChatHistory(selectedIDS.front()); + } } } else @@ -1320,6 +1335,15 @@ bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata) { return LLLogChat::isNearbyTranscriptExist(); } + else if (getCurSelectedViewModelItem()->getType() == LLConversationItem::CONV_SESSION_AD_HOC) + { + const LLConversation* conv = LLConversationLog::instance().findConversation(LLIMModel::getInstance()->findIMSession(uuids.front())); + if(conv) + { + return LLLogChat::isAdHocTranscriptExist(conv->getHistoryFileName()); + } + return false; + } else { bool is_group = (getCurSelectedViewModelItem()->getType() == LLConversationItem::CONV_SESSION_GROUP); diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 7ddacf3033..4116e38f11 100755 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -804,6 +804,22 @@ bool LLLogChat::isNearbyTranscriptExist() return false; } +bool LLLogChat::isAdHocTranscriptExist(std::string file_name) +{ + std::vector list_of_transcriptions; + LLLogChat::getListOfTranscriptFiles(list_of_transcriptions); + + file_name = makeLogFileName(file_name); + BOOST_FOREACH(std::string& transcript_file_name, list_of_transcriptions) + { + if (transcript_file_name == file_name) + { + return true; + } + } + return false; +} + //*TODO mark object's names in a special way so that they will be distinguishable form avatar name //which are more strict by its nature (only firstname and secondname) //Example, an object's name can be written like "Object " diff --git a/indra/newview/lllogchat.h b/indra/newview/lllogchat.h index ca597599dd..6022e539a9 100755 --- a/indra/newview/lllogchat.h +++ b/indra/newview/lllogchat.h @@ -120,6 +120,7 @@ public: static void deleteTranscripts(); static bool isTranscriptExist(const LLUUID& avatar_id, bool is_group=false); static bool isNearbyTranscriptExist(); + static bool isAdHocTranscriptExist(std::string file_name); static bool historyThreadsFinished(LLUUID session_id); static LLLoadHistoryThread* getLoadHistoryThread(LLUUID session_id); -- cgit v1.2.3 From 0a333e9a039288969b3ce207772fee8cbeb2ca83 Mon Sep 17 00:00:00 2001 From: vyacheslavsproductengine Date: Tue, 19 May 2015 19:28:03 +0400 Subject: MAINT-3548 - FIXED-R2 Horizontal & vertical offset values for normal & specular maps still randomly revert to previous settings when building. --- indra/llprimitive/llprimitive.cpp | 4 ++-- indra/llprimitive/llprimitive.h | 2 +- indra/llprimitive/llprimtexturelist.cpp | 11 +++++++++-- indra/llprimitive/llprimtexturelist.h | 2 +- indra/llprimitive/lltextureentry.cpp | 4 ++++ indra/llprimitive/lltextureentry.h | 4 ++++ indra/newview/llpanelface.h | 2 +- indra/newview/llselectmgr.cpp | 2 +- indra/newview/llviewerobject.cpp | 9 +++++---- indra/newview/llviewerobject.h | 2 +- indra/newview/llvovolume.cpp | 10 +++++----- indra/newview/llvovolume.h | 2 +- 12 files changed, 35 insertions(+), 19 deletions(-) diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp index 29747cb09c..8e009972d0 100755 --- a/indra/llprimitive/llprimitive.cpp +++ b/indra/llprimitive/llprimitive.cpp @@ -317,9 +317,9 @@ S32 LLPrimitive::setTEMaterialID(const U8 index, const LLMaterialID& pMaterialID return mTextureList.setMaterialID(index, pMaterialID); } -S32 LLPrimitive::setTEMaterialParams(const U8 index, const LLMaterialPtr pMaterialParams) +S32 LLPrimitive::setTEMaterialParams(const U8 index, const LLMaterialPtr pMaterialParams, bool isInitFromServer) { - return mTextureList.setMaterialParams(index, pMaterialParams); + return mTextureList.setMaterialParams(index, pMaterialParams, isInitFromServer); } LLMaterialPtr LLPrimitive::getTEMaterialParams(const U8 index) diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h index 1bf83e36b4..db7327e900 100755 --- a/indra/llprimitive/llprimitive.h +++ b/indra/llprimitive/llprimitive.h @@ -385,7 +385,7 @@ public: virtual S32 setTEMediaFlags(const U8 te, const U8 flags); virtual S32 setTEGlow(const U8 te, const F32 glow); virtual S32 setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID); - virtual S32 setTEMaterialParams(const U8 index, const LLMaterialPtr pMaterialParams); + virtual S32 setTEMaterialParams(const U8 index, const LLMaterialPtr pMaterialParams, bool isInitFromServer); virtual BOOL setMaterial(const U8 material); // returns TRUE if material changed virtual void setTESelected(const U8 te, bool sel); diff --git a/indra/llprimitive/llprimtexturelist.cpp b/indra/llprimitive/llprimtexturelist.cpp index f4f08248b8..6aae2f97c6 100755 --- a/indra/llprimitive/llprimtexturelist.cpp +++ b/indra/llprimitive/llprimtexturelist.cpp @@ -368,11 +368,18 @@ S32 LLPrimTextureList::setMaterialID(const U8 index, const LLMaterialID& pMateri return TEM_CHANGE_NONE; } -S32 LLPrimTextureList::setMaterialParams(const U8 index, const LLMaterialPtr pMaterialParams) +S32 LLPrimTextureList::setMaterialParams(const U8 index, const LLMaterialPtr pMaterialParams, bool isInitFromServer) { if (index < mEntryList.size()) { - return mEntryList[index]->setMaterialParams(pMaterialParams); + if (!isInitFromServer && mEntryList[index]->isMatParamsInitFromServer()) + { + return TEM_CHANGE_NONE; + } + else + { + return mEntryList[index]->setMaterialParams(pMaterialParams); + } } return TEM_CHANGE_NONE; } diff --git a/indra/llprimitive/llprimtexturelist.h b/indra/llprimitive/llprimtexturelist.h index 49c636e40f..63e6372405 100755 --- a/indra/llprimitive/llprimtexturelist.h +++ b/indra/llprimitive/llprimtexturelist.h @@ -105,7 +105,7 @@ public: S32 setMediaFlags(const U8 index, const U8 media_flags); S32 setGlow(const U8 index, const F32 glow); S32 setMaterialID(const U8 index, const LLMaterialID& pMaterialID); - S32 setMaterialParams(const U8 index, const LLMaterialPtr pMaterialParams); + S32 setMaterialParams(const U8 index, const LLMaterialPtr pMaterialParams, bool isInitFromServer); LLMaterialPtr getMaterialParams(const U8 index); diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp index 284dfc15f4..6020031099 100755 --- a/indra/llprimitive/lltextureentry.cpp +++ b/indra/llprimitive/lltextureentry.cpp @@ -63,6 +63,7 @@ LLTextureEntry::LLTextureEntry() : mMediaEntry(NULL) , mSelected(false) , mMaterialUpdatePending(false) + , mInitMatParamsFromServer(false) { init(LLUUID::null,1.f,1.f,0.f,0.f,0.f,DEFAULT_BUMP_CODE); } @@ -71,6 +72,7 @@ LLTextureEntry::LLTextureEntry(const LLUUID& tex_id) : mMediaEntry(NULL) , mSelected(false) , mMaterialUpdatePending(false) + , mInitMatParamsFromServer(false) { init(tex_id,1.f,1.f,0.f,0.f,0.f,DEFAULT_BUMP_CODE); } @@ -79,6 +81,7 @@ LLTextureEntry::LLTextureEntry(const LLTextureEntry &rhs) : mMediaEntry(NULL) , mSelected(false) , mMaterialUpdatePending(false) + , mInitMatParamsFromServer(false) { mID = rhs.mID; mScaleS = rhs.mScaleS; @@ -562,6 +565,7 @@ S32 LLTextureEntry::setMaterialParams(const LLMaterialPtr pMaterialParams) mMaterialUpdatePending = true; } mMaterial = pMaterialParams; + this->mInitMatParamsFromServer = TRUE; return TEM_CHANGE_TEXTURE; } diff --git a/indra/llprimitive/lltextureentry.h b/indra/llprimitive/lltextureentry.h index 19edcaa27d..3fe23d6c9f 100755 --- a/indra/llprimitive/lltextureentry.h +++ b/indra/llprimitive/lltextureentry.h @@ -156,6 +156,8 @@ public: const LLMaterialID& getMaterialID() const { return mMaterialID; }; const LLMaterialPtr getMaterialParams() const { return mMaterial; }; + bool isMatParamsInitFromServer() const { return mInitMatParamsFromServer; }; + // *NOTE: it is possible for hasMedia() to return true, but getMediaData() to return NULL. // CONVERSELY, it is also possible for hasMedia() to return false, but getMediaData() // to NOT return NULL. @@ -213,6 +215,8 @@ protected: bool mMaterialUpdatePending; LLMaterialID mMaterialID; LLMaterialPtr mMaterial; + bool mInitMatParamsFromServer; // Flag to identification when material paramas initialized from + // Note the media data is not sent via the same message structure as the rest of the TE LLMediaEntry* mMediaEntry; // The media data for the face diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 9823e84cd9..d7e89b4832 100755 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -307,7 +307,7 @@ private: LLMaterialMgr::getInstance()->put(object->getID(),face,*new_material); } - object->setTEMaterialParams(face, new_material); + object->setTEMaterialParams(face, new_material, TRUE); return new_material; } return NULL; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index cbc00d8b53..fa7674f772 100755 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -2134,7 +2134,7 @@ void LLSelectMgr::selectionRemoveMaterial() { LL_DEBUGS("Materials") << "Removing material from object " << object->getID() << " face " << face << LL_ENDL; LLMaterialMgr::getInstance()->remove(object->getID(),face); - object->setTEMaterialParams(face, NULL); + object->setTEMaterialParams(face, NULL, FALSE); } return true; } diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index a2c0a91ea6..b8ed17f382 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -4632,7 +4632,7 @@ S32 LLViewerObject::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID return retval; } -S32 LLViewerObject::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams) +S32 LLViewerObject::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams, bool isInitFromServer) { S32 retval = 0; const LLTextureEntry *tep = getTE(te); @@ -4642,13 +4642,14 @@ S32 LLViewerObject::setTEMaterialParams(const U8 te, const LLMaterialPtr pMateri return 0; } - retval = LLPrimitive::setTEMaterialParams(te, pMaterialParams); + setTENormalMap(te, (pMaterialParams) ? pMaterialParams->getNormalID() : LLUUID::null); + setTESpecularMap(te, (pMaterialParams) ? pMaterialParams->getSpecularID() : LLUUID::null); + + retval = LLPrimitive::setTEMaterialParams(te, pMaterialParams, isInitFromServer); LL_DEBUGS("Material") << "Changing material params for te " << (S32)te << ", object " << mID << " (" << retval << ")" << LL_ENDL; - setTENormalMap(te, (pMaterialParams) ? pMaterialParams->getNormalID() : LLUUID::null); - setTESpecularMap(te, (pMaterialParams) ? pMaterialParams->getSpecularID() : LLUUID::null); refreshMaterials(); return retval; diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 05c87c153b..db2749f413 100755 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -330,7 +330,7 @@ public: /*virtual*/ S32 setTEMediaFlags(const U8 te, const U8 media_flags ); /*virtual*/ S32 setTEGlow(const U8 te, const F32 glow); /*virtual*/ S32 setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID); - /*virtual*/ S32 setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams); + /*virtual*/ S32 setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams, bool isInitFromServer); // Used by Materials update functions to properly kick off rebuilds // of VBs etc when materials updates require changes. diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 0432f6f27c..f435fd754b 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2010,7 +2010,7 @@ void LLVOVolume::setTEMaterialParamsCallbackTE(const LLUUID& objectID, const LLM LLTextureEntry* texture_entry = pVol->getTE(te); if (texture_entry && (texture_entry->getMaterialID() == pMaterialID)) { - pVol->setTEMaterialParams(te, pMaterialParams); + pVol->setTEMaterialParams(te, pMaterialParams, FALSE); } } } @@ -2081,7 +2081,7 @@ bool LLVOVolume::notifyAboutCreatingTexture(LLViewerTexture *texture) for(map_te_material::const_iterator it = new_material.begin(), end = new_material.end(); it != end; ++it) { LLMaterialMgr::getInstance()->put(getID(), it->first, *it->second); - LLViewerObject::setTEMaterialParams(it->first, it->second); + LLViewerObject::setTEMaterialParams(it->first, it->second, FALSE); } //clear wait-list @@ -2158,7 +2158,7 @@ bool LLVOVolume::notifyAboutMissingAsset(LLViewerTexture *texture) for(map_te_material::const_iterator it = new_material.begin(), end = new_material.end(); it != end; ++it) { LLMaterialMgr::getInstance()->put(getID(), it->first, *it->second); - LLViewerObject::setTEMaterialParams(it->first, it->second); + LLViewerObject::setTEMaterialParams(it->first, it->second, FALSE); } //clear wait-list @@ -2167,7 +2167,7 @@ bool LLVOVolume::notifyAboutMissingAsset(LLViewerTexture *texture) return 0 != new_material.size(); } -S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams) +S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams, bool isInitFromServer) { LLMaterialPtr pMaterial = const_cast(pMaterialParams); @@ -2264,7 +2264,7 @@ S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialPa } } - S32 res = LLViewerObject::setTEMaterialParams(te, pMaterial); + S32 res = LLViewerObject::setTEMaterialParams(te, pMaterial, isInitFromServer); LL_DEBUGS("MaterialTEs") << "te " << (S32)te << " material " << ((pMaterial) ? pMaterial->asLLSD() : LLSD("null")) << " res " << res << ( LLSelectMgr::getInstance()->getSelection()->contains(const_cast(this), te) ? " selected" : " not selected" ) diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index bbaca316b0..3e33bbd71c 100755 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -192,7 +192,7 @@ public: static void setTEMaterialParamsCallbackTE(const LLUUID& objectID, const LLMaterialID& pMaterialID, const LLMaterialPtr pMaterialParams, U32 te); - /*virtual*/ S32 setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams); + /*virtual*/ S32 setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams, bool isInitFromServer); /*virtual*/ S32 setTEScale(const U8 te, const F32 s, const F32 t); /*virtual*/ S32 setTEScaleS(const U8 te, const F32 s); /*virtual*/ S32 setTEScaleT(const U8 te, const F32 t); -- cgit v1.2.3 From d86a6403ca021de44ad94abb8a499adf0ea016f6 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 20 May 2015 12:43:50 +0300 Subject: MAINT-5217 FIXED Allow dragging outfit folders to other folders inside 'My outfit'. --- indra/newview/llinventorybridge.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 177efc4e79..f4873856d8 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2258,8 +2258,14 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } if (is_movable && move_is_into_outfit) { - is_movable = FALSE; - // tooltip? + if((mUUID == my_outifts_id) || (getCategory() && getCategory()->getPreferredType() == LLFolderType::FT_NONE)) + { + is_movable = ((inv_cat->getPreferredType() == LLFolderType::FT_NONE) || (inv_cat->getPreferredType() == LLFolderType::FT_OUTFIT)); + } + else + { + is_movable = false; + } } if(is_movable && move_is_into_current_outfit && is_link) { -- cgit v1.2.3 From cae660f50e1cffd7e3143b26b8b3e1a38d729eab Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 21 May 2015 11:50:31 +0300 Subject: MAINT-5081 FIXED secondlife.log - WARNING: LLHTTPFeatureTableResponder 404 error --- indra/newview/llstartup.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index e519032b9e..c012537e78 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -419,9 +419,7 @@ bool idle_startup() gSavedSettings.setS32("LastFeatureVersion", LLFeatureManager::getInstance()->getVersion()); gSavedSettings.setString("LastGPUString", thisGPU); - // load dynamic GPU/feature tables from website (S3) - LLFeatureManager::getInstance()->fetchHTTPTables(); - + std::string xml_file = LLUI::locateSkin("xui_version.xml"); LLXMLNodePtr root; bool xml_ok = false; -- cgit v1.2.3 From 4e6b91abb65823a96a7b67c434f63b9367864c46 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 22 May 2015 14:07:02 +0300 Subject: MAINT-999 FIXED Clear message when clicking Save button. --- indra/newview/llpreviewscript.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 7feb20332b..eff28a0123 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -2401,8 +2401,12 @@ void LLLiveLSLEditor::onLoad(void* userdata) void LLLiveLSLEditor::onSave(void* userdata, BOOL close_after_save) { LLLiveLSLEditor* self = (LLLiveLSLEditor*)userdata; - self->mCloseAfterSave = close_after_save; - self->saveIfNeeded(); + if(self) + { + self->mCloseAfterSave = close_after_save; + self->mScriptEd->mErrorList->setCommentText(""); + self->saveIfNeeded(); + } } -- cgit v1.2.3 From e772df538a2563a52f6ec23539bbe5f3e3be6b9f Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 25 May 2015 12:04:58 +0300 Subject: MAINT-5155 FIXED Unfortunate way to accidently permanantly delete outfits which bypasses Trash --- indra/newview/llinventorybridge.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index f4873856d8..59e20afb87 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2485,9 +2485,11 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } } } + // if target is current outfit folder we use link if (move_is_into_current_outfit && - inv_cat->getPreferredType() == LLFolderType::FT_NONE) + (inv_cat->getPreferredType() == LLFolderType::FT_NONE || + inv_cat->getPreferredType() == LLFolderType::FT_OUTFIT)) { // traverse category and add all contents to currently worn. BOOL append = true; -- cgit v1.2.3 From 394952e4769d343773989dfbb3f5237f71cacf5a Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 26 May 2015 17:27:53 +0300 Subject: MAINT-5233 FIXED Viewer fall into recourse and crash when try open chat floater --- indra/newview/llfloaterimcontainer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 04f8c09ca0..46fc6ea0cd 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -640,12 +640,12 @@ void LLFloaterIMContainer::setVisible(BOOL visible) nearby_chat = LLFloaterReg::findTypedInstance("nearby_chat"); if ((nearby_chat == NULL) || mIsFirstOpen) { + mIsFirstOpen = false; // If not found, force the creation of the nearby chat conversation panel // *TODO: find a way to move this to XML as a default panel or something like that LLSD name("nearby_chat"); LLFloaterReg::toggleInstanceOrBringToFront(name); selectConversationPair(LLUUID(NULL), false, false); - mIsFirstOpen = false; } flashConversationItemWidget(mSelectedSession,false); -- cgit v1.2.3 From 5c7b29920e8ed409e7c8d87e52a1d0f35b2a14b2 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Tue, 26 May 2015 07:27:36 +0300 Subject: MAINT-5096 FIXED Camming is broken in freeze frame mode once snapshot is refreshed... Fix for freezing by ticking the "Freeze frame" checkbox --- indra/newview/llfloatersnapshot.cpp | 8 +++- indra/newview/llsnapshotlivepreview.cpp | 76 +++++++++++++++++++-------------- indra/newview/llsnapshotlivepreview.h | 2 +- 3 files changed, 51 insertions(+), 35 deletions(-) diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 16fa4684ab..afec981d56 100755 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -663,14 +663,20 @@ void LLFloaterSnapshot::Impl::onCommitFreezeFrame(LLUICtrl* ctrl, void* data) { LLCheckBoxCtrl* check_box = (LLCheckBoxCtrl*)ctrl; LLFloaterSnapshot *view = (LLFloaterSnapshot *)data; + LLSnapshotLivePreview* previewp = getPreviewView(view); - if (!view || !check_box) + if (!view || !check_box || !previewp) { return; } gSavedSettings.setBOOL("UseFreezeFrame", check_box->get()); + if (check_box->get()) + { + previewp->prepareFreezeFrame(); + } + updateLayout(view); } diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index abab3174cd..6af9d61a54 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -750,40 +750,9 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) // Full size preview is set: get the decoded image result and save it for animation if (gSavedSettings.getBOOL("UseFreezeFrame") && previewp->mAllowFullScreenPreview) { - // Get the decoded version of the formatted image - previewp->getEncodedImage(); - - // We need to scale that a bit for display... - LLPointer scaled = new LLImageRaw( - previewp->mPreviewImageEncoded->getData(), - previewp->mPreviewImageEncoded->getWidth(), - previewp->mPreviewImageEncoded->getHeight(), - previewp->mPreviewImageEncoded->getComponents()); - - if (!scaled->isBufferInvalid()) - { - // leave original image dimensions, just scale up texture buffer - if (previewp->mPreviewImageEncoded->getWidth() > 1024 || previewp->mPreviewImageEncoded->getHeight() > 1024) - { - // go ahead and shrink image to appropriate power of 2 for display - scaled->biasedScaleToPowerOfTwo(1024); - previewp->setImageScaled(TRUE); - } - else - { - // expand image but keep original image data intact - scaled->expandToPowerOfTwo(1024, FALSE); - } - - previewp->mViewerImage[previewp->mCurImageIndex] = LLViewerTextureManager::getLocalTexture(scaled.get(), FALSE); - LLPointer curr_preview_image = previewp->mViewerImage[previewp->mCurImageIndex]; - gGL.getTexUnit(0)->bind(curr_preview_image); - curr_preview_image->setFilteringOption(previewp->getSnapshotType() == SNAPSHOT_TEXTURE ? LLTexUnit::TFO_ANISOTROPIC : LLTexUnit::TFO_POINT); - curr_preview_image->setAddressMode(LLTexUnit::TAM_CLAMP); - - previewp->mShineCountdown = 4; // wait a few frames to avoid animation glitch due to readback this frame - } + previewp->prepareFreezeFrame(); } + // The snapshot is updated now... previewp->mSnapshotUpToDate = TRUE; @@ -811,6 +780,47 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) return TRUE; } +void LLSnapshotLivePreview::prepareFreezeFrame() +{ + // Get the decoded version of the formatted image + getEncodedImage(); + + // We need to scale that a bit for display... + LLPointer scaled = new LLImageRaw( + mPreviewImageEncoded->getData(), + mPreviewImageEncoded->getWidth(), + mPreviewImageEncoded->getHeight(), + mPreviewImageEncoded->getComponents()); + + if (!scaled->isBufferInvalid()) + { + // leave original image dimensions, just scale up texture buffer + if (mPreviewImageEncoded->getWidth() > 1024 || mPreviewImageEncoded->getHeight() > 1024) + { + // go ahead and shrink image to appropriate power of 2 for display + scaled->biasedScaleToPowerOfTwo(1024); + setImageScaled(TRUE); + } + else + { + // expand image but keep original image data intact + scaled->expandToPowerOfTwo(1024, FALSE); + } + + mViewerImage[mCurImageIndex] = LLViewerTextureManager::getLocalTexture(scaled.get(), FALSE); + LLPointer curr_preview_image = mViewerImage[mCurImageIndex]; + gGL.getTexUnit(0)->bind(curr_preview_image); + curr_preview_image->setFilteringOption(getSnapshotType() == SNAPSHOT_TEXTURE ? LLTexUnit::TFO_ANISOTROPIC : LLTexUnit::TFO_POINT); + curr_preview_image->setAddressMode(LLTexUnit::TAM_CLAMP); + + + if (gSavedSettings.getBOOL("UseFreezeFrame") && mAllowFullScreenPreview) + { + mShineCountdown = 4; // wait a few frames to avoid animation glitch due to readback this frame + } + } +} + S32 LLSnapshotLivePreview::getEncodedImageWidth() const { S32 width = getWidth(); diff --git a/indra/newview/llsnapshotlivepreview.h b/indra/newview/llsnapshotlivepreview.h index fed33bf37c..57e5d83f8e 100644 --- a/indra/newview/llsnapshotlivepreview.h +++ b/indra/newview/llsnapshotlivepreview.h @@ -119,7 +119,7 @@ public: void generateThumbnailImage(BOOL force_update = FALSE) ; void resetThumbnailImage() { mThumbnailImage = NULL ; } void drawPreviewRect(S32 offset_x, S32 offset_y) ; - + void prepareFreezeFrame(); LLViewerTexture* getBigThumbnailImage(); S32 getBigThumbnailWidth() const { return mBigThumbnailWidth ; } -- cgit v1.2.3 From 51eafb9ffeea5ae4fca0a40e94ddc60f295abf7b Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 27 May 2015 11:53:13 +0300 Subject: MAINT-1677 FIXED Explanation text doesn't disappear after creating "New classified" in the "Picks" dialog --- indra/newview/llpanelpicks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index d73a5b402e..55c09d85ea 100755 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -432,7 +432,7 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type) mNoPicks = !mPicksList->size(); } - else if(APT_CLASSIFIEDS == type) + else if((APT_CLASSIFIEDS == type) || (APT_CLASSIFIED_INFO == type)) { LLAvatarClassifieds* c_info = static_cast(data); if(c_info && getAvatarId() == c_info->target_id) -- cgit v1.2.3 From 987b9fdae24bc7bbe8aeddcbe2f8a3472d4428c4 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 27 May 2015 18:16:51 +0300 Subject: MAINT-839 FIXED [PUBLIC]Clicking at menu a second time does not close it. --- indra/llui/llmenugl.cpp | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 43ceb0e4c6..fbf2bb5f98 100755 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -1457,23 +1457,15 @@ BOOL LLMenuItemBranchDownGL::handleMouseDown( S32 x, S32 y, MASK mask ) // switch to mouse control mode LLMenuGL::setKeyboardMode(FALSE); - if (getVisible() && getHighlight() && getBranch()) + if (getVisible() && isOpen()) { - // already open - hide menu - LLMenuGL::setKeyboardMode(FALSE); - for (child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it) - { - LLView* viewp = *child_it; - if (dynamic_cast(viewp) != NULL && viewp->getVisible()) - { - viewp->setVisible(FALSE); - } - } + LLMenuGL::sMenuContainer->hideMenus(); } else { onCommit(); } + make_ui_sound("UISndClick"); return TRUE; } @@ -3642,8 +3634,24 @@ BOOL LLMenuHolderGL::handleMouseDown( S32 x, S32 y, MASK mask ) BOOL handled = LLView::childrenHandleMouseDown(x, y, mask) != NULL; if (!handled) { - // clicked off of menu, hide them all - hideMenus(); + LLMenuGL* visible_menu = (LLMenuGL*)getVisibleMenu(); + LLMenuItemGL* parent_menu = visible_menu ? visible_menu->getParentMenuItem() : NULL; + if (parent_menu && parent_menu->getVisible()) + { + // don't hide menu if parent was hit + LLRect parent_rect; + parent_menu->localRectToOtherView(parent_menu->getLocalRect(), &parent_rect, this); + if (!parent_rect.pointInRect(x, y)) + { + // clicked off of menu and parent, hide them all + hideMenus(); + } + } + else + { + // no visible parent, clicked off of menu, hide them all + hideMenus(); + } } return handled; } -- cgit v1.2.3 From 7854350151061345e0f1d7ed0a6cfaf767570949 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Wed, 27 May 2015 20:02:16 +0300 Subject: MAINT-5225 FIXED Viewer makes unnecessary requests to get group members --- indra/newview/llgroupmgr.h | 2 +- indra/newview/llpanelgroupgeneral.cpp | 5 ----- indra/newview/llpanelgrouproles.cpp | 42 +++++++++++++---------------------- 3 files changed, 17 insertions(+), 32 deletions(-) diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h index 2e94e8d9a0..a58799350d 100755 --- a/indra/newview/llgroupmgr.h +++ b/indra/newview/llgroupmgr.h @@ -149,7 +149,7 @@ public: const uuid_vec_t& getRoleMembers() const { return mMemberIDs; } S32 getMembersInRole(uuid_vec_t members, BOOL needs_sort = TRUE); - S32 getTotalMembersInRole() { return mMemberIDs.size(); } + S32 getTotalMembersInRole() { return mMemberCount ? mMemberCount : mMemberIDs.size(); } //FIXME: Returns 0 for Everyone role when Member list isn't yet loaded, see MAINT-5225 LLRoleData getRoleData() const { return mRoleData; } void setRoleData(LLRoleData data) { mRoleData = data; } diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index 7ffaa05919..b2164c1f21 100755 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -287,11 +287,6 @@ void LLPanelGroupGeneral::activate() { LLGroupMgr::getInstance()->sendGroupTitlesRequest(mGroupID); LLGroupMgr::getInstance()->sendGroupPropertiesRequest(mGroupID); - - if (!gdatap || !gdatap->isMemberDataComplete() ) - { - LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mGroupID); - } mFirstUse = FALSE; } diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index c3a10b3fa0..2b71fd5ece 100755 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -350,12 +350,10 @@ void LLPanelGroupRoles::update(LLGroupChange gc) void LLPanelGroupRoles::activate() { + if (!gAgent.isInGroup(mGroupID)) return; + // Start requesting member and role data if needed. LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); - if (!gdatap || !gdatap->isMemberDataComplete() ) - { - LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mGroupID); - } if (!gdatap || !gdatap->isRoleDataComplete() ) { @@ -364,13 +362,7 @@ void LLPanelGroupRoles::activate() LLGroupMgr::getInstance()->sendGroupRoleDataRequest(mGroupID); } - - // Check role-member mapping data. - if (!gdatap || !gdatap->isRoleMemberDataComplete() ) - { - LLGroupMgr::getInstance()->sendGroupRoleMembersRequest(mGroupID); - } - + // Need this to get base group member powers if (!gdatap || !gdatap->isGroupPropertiesDataComplete() ) { @@ -1327,15 +1319,26 @@ void LLPanelGroupMembersSubTab::handleMemberDoubleClick() void LLPanelGroupMembersSubTab::activate() { + LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); + LLPanelGroupSubTab::activate(); if(!mActivated) { + if (!gdatap || !gdatap->isMemberDataComplete()) + { + LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mGroupID); + } + + if (!gdatap || !gdatap->isRoleMemberDataComplete()) + { + LLGroupMgr::getInstance()->sendGroupRoleMembersRequest(mGroupID); + } + update(GC_ALL); mActivated = true; } else { - LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); // Members can be removed outside of this tab, checking changes if (!gdatap || (gdatap->isMemberDataComplete() && gdatap->mMembers.size() != mMembersList->getItemCount())) { @@ -2111,20 +2114,7 @@ void LLPanelGroupRolesSubTab::update(LLGroupChange gc) mDeleteRoleButton->setEnabled(FALSE); } } - - if(!mFirstOpen) - { - if (!gdatap || !gdatap->isMemberDataComplete()) - { - LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mGroupID); - } - - if (!gdatap || !gdatap->isRoleMemberDataComplete()) - { - LLGroupMgr::getInstance()->sendGroupRoleMembersRequest(mGroupID); - } - } - + if ((GC_ROLE_MEMBER_DATA == gc || GC_MEMBER_DATA == gc) && gdatap && gdatap->isMemberDataComplete() -- cgit v1.2.3 From b59e4a02b65480d79ca8ce9dd1859ecedeecb1e6 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 28 May 2015 12:08:06 +0300 Subject: MAINT-3597 FIXED Bumps, Pushes & Hits Improvements --- indra/newview/llfloaterbump.cpp | 32 ++++++++++++++++------ indra/newview/llfloaterbump.h | 4 +++ indra/newview/llviewermessage.cpp | 6 ++++ .../newview/skins/default/xui/en/floater_bumps.xml | 6 ++-- 4 files changed, 36 insertions(+), 12 deletions(-) diff --git a/indra/newview/llfloaterbump.cpp b/indra/newview/llfloaterbump.cpp index 34904cf7ed..957c91b226 100755 --- a/indra/newview/llfloaterbump.cpp +++ b/indra/newview/llfloaterbump.cpp @@ -32,6 +32,7 @@ #include "llavataractions.h" #include "llfloaterbump.h" +#include "llfloaterreg.h" #include "llfloaterreporter.h" #include "llmutelist.h" #include "llpanelblockedlist.h" @@ -87,11 +88,11 @@ BOOL LLFloaterBump::postBuild() // virtual void LLFloaterBump::onOpen(const LLSD& key) { - mNames.clear(); - mList->deleteAllItems(); - if (gMeanCollisionList.empty()) { + mNames.clear(); + mList->deleteAllItems(); + std::string none_detected = getString("none_detected"); LLSD row; row["columns"][0]["value"] = none_detected; @@ -100,12 +101,20 @@ void LLFloaterBump::onOpen(const LLSD& key) } else { - for (mean_collision_list_t::iterator iter = gMeanCollisionList.begin(); - iter != gMeanCollisionList.end(); ++iter) - { - LLMeanCollisionData *mcd = *iter; - add(mList, mcd); - } + populateCollisionList(); + } +} + +void LLFloaterBump::populateCollisionList() +{ + mNames.clear(); + mList->deleteAllItems(); + + for (mean_collision_list_t::iterator iter = gMeanCollisionList.begin(); + iter != gMeanCollisionList.end(); ++iter) + { + LLMeanCollisionData *mcd = *iter; + add(mList, mcd); } } @@ -247,3 +256,8 @@ void LLFloaterBump::inviteToGroup() { LLAvatarActions::inviteToGroup(mItemUUID); } + +LLFloaterBump* LLFloaterBump::getInstance() +{ + return LLFloaterReg::getTypedInstance("bumps"); +} diff --git a/indra/newview/llfloaterbump.h b/indra/newview/llfloaterbump.h index 11b7db9fee..ce52c75255 100755 --- a/indra/newview/llfloaterbump.h +++ b/indra/newview/llfloaterbump.h @@ -46,6 +46,10 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); + static LLFloaterBump* getInstance(); + + void populateCollisionList(); + void startIM(); void startCall(); void reportAbuse(); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 4e9144ac26..f5350a0b30 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -57,6 +57,7 @@ #include "llcallingcard.h" #include "llbuycurrencyhtml.h" #include "llfirstuse.h" +#include "llfloaterbump.h" #include "llfloaterbuyland.h" #include "llfloaterland.h" #include "llfloaterregioninfo.h" @@ -6215,6 +6216,11 @@ void process_mean_collision_alert_message(LLMessageSystem *msgsystem, void **use gCacheName->get(perp, false, boost::bind(&mean_name_callback, _1, _2, _3)); } } + LLFloaterBump* bumps_floater = LLFloaterBump::getInstance(); + if(bumps_floater && bumps_floater->isInVisibleChain()) + { + bumps_floater->populateCollisionList(); + } } void process_frozen_message(LLMessageSystem *msgsystem, void **user_data) diff --git a/indra/newview/skins/default/xui/en/floater_bumps.xml b/indra/newview/skins/default/xui/en/floater_bumps.xml index 1f2fe62b3c..126e3aac48 100755 --- a/indra/newview/skins/default/xui/en/floater_bumps.xml +++ b/indra/newview/skins/default/xui/en/floater_bumps.xml @@ -7,7 +7,7 @@ help_topic="floater_bumps" save_rect="true" title="BUMPS, PUSHES & HITS" - width="400"> + width="420"> None detected @@ -34,7 +34,7 @@ - [[hour,datetime,slt]:[min,datetime,slt]] + [[hour,datetime,slt]:[min,datetime,slt]:[second,datetime,slt]] + width="408" /> -- cgit v1.2.3 From dd3b9776d2f932c7142884b5adc5477d5cc7cf3d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 28 May 2015 17:46:20 +0300 Subject: MAINT-5227 FIXED Changing premium access of an account with > 42 groups back to basic account shows negative number of groups that they can join --- indra/newview/llpanelpeople.cpp | 18 ++++++++++++++++-- indra/newview/llpanelpeople.h | 1 + indra/newview/skins/default/xui/en/notifications.xml | 15 +++++++++++++++ indra/newview/skins/default/xui/en/panel_people.xml | 2 +- 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 5977d558d3..de4efc8612 100755 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -85,6 +85,8 @@ static const std::string RECENT_TAB_NAME = "recent_panel"; static const std::string BLOCKED_TAB_NAME = "blocked_panel"; // blocked avatars static const std::string COLLAPSED_BY_USER = "collapsed_by_user"; +const S32 BASE_MAX_AGENT_GROUPS = 42; +const S32 PREMIUM_MAX_AGENT_GROUPS = 60; extern S32 gMaxAgentGroups; @@ -585,6 +587,7 @@ BOOL LLPanelPeople::postBuild() getChild("groups_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); getChild("recent_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); getChild("fbc_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); + getChild("groupcount")->setURLClickedCallback(boost::bind(&LLPanelPeople::onGroupLimitInfo, this)); mTabContainer = getChild("tabs"); mTabContainer->setCommitCallback(boost::bind(&LLPanelPeople::onTabSelected, this, _2)); @@ -902,8 +905,11 @@ void LLPanelPeople::updateButtons() LLPanel* groups_panel = mTabContainer->getCurrentPanel(); groups_panel->getChildView("minus_btn")->setEnabled(item_selected && selected_id.notNull()); // a real group selected - groups_panel->getChild("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.size())); - groups_panel->getChild("groupcount")->setTextArg("[REMAINING]", llformat("%d",(gMaxAgentGroups-gAgent.mGroups.size()))); + + U32 groups_count = gAgent.mGroups.size(); + U32 groups_ramaining = gMaxAgentGroups > groups_count ? gMaxAgentGroups - groups_count : 0; + groups_panel->getChild("groupcount")->setTextArg("[COUNT]", llformat("%d", groups_count)); + groups_panel->getChild("groupcount")->setTextArg("[REMAINING]", llformat("%d", groups_ramaining)); } else { @@ -1114,6 +1120,14 @@ void LLPanelPeople::onFilterEdit(const std::string& search_string) } } +void LLPanelPeople::onGroupLimitInfo() +{ + LLSD args; + args["MAX_BASIC"] = BASE_MAX_AGENT_GROUPS; + args["MAX_PREMIUM"] = PREMIUM_MAX_AGENT_GROUPS; + LLNotificationsUtil::add("GroupLimitInfo", args); +} + void LLPanelPeople::onTabSelected(const LLSD& param) { std::string tab_name = getChild(param.asString())->getName(); diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index c1d7a134fa..eb7e76a772 100755 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -93,6 +93,7 @@ private: // UI callbacks void onFilterEdit(const std::string& search_string); + void onGroupLimitInfo(); void onTabSelected(const LLSD& param); void onAddFriendButtonClicked(); void onAddFriendWizButtonClicked(); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index ba8502ba81..97d1fd0c0f 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -3973,6 +3973,21 @@ You have reached your maximum number of groups. Please leave some group before j yestext="OK"/> + +The group limit for base accounts is [MAX_BASIC], and for [https://secondlife.com/premium/ premium] +accounts is [MAX_PREMIUM]. +If you downgraded your account, you will need to get below [MAX_BASIC] group limit before you can join more. + +[https://secondlife.com/my/account/membership.php Upgrade today!] + group + + + - You belong to [COUNT] groups, and can join [REMAINING] more. + You belong to [COUNT] groups, and can join [REMAINING] more. [secondlife:/// Want more?] Date: Fri, 29 May 2015 13:23:36 +0300 Subject: MAINT-1850 FIXED Update Preview tittle and description after setting texture's id. --- indra/newview/llpreviewtexture.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index f91a18d8d3..c8cf0faa15 100755 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -618,4 +618,5 @@ void LLPreviewTexture::setObjectID(const LLUUID& object_id) mAssetStatus = PREVIEW_ASSET_UNLOADED; loadAsset(); } + refreshFromItem(); } -- cgit v1.2.3 From 4fa3e33c4df9ed4e225ee0a089232e83bce8ce5e Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 2 Jun 2015 13:15:31 +0300 Subject: MAINT-2007 FIXED Restored the code for ejecting confirmation. Confirmation on banning was added. --- indra/newview/llpanelgrouproles.cpp | 84 +++++++++++++++++++++- indra/newview/llpanelgrouproles.h | 3 + .../newview/skins/default/xui/en/notifications.xml | 27 +++++++ 3 files changed, 112 insertions(+), 2 deletions(-) diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 2b71fd5ece..2b7028827b 100755 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -1155,7 +1155,37 @@ void LLPanelGroupMembersSubTab::onEjectMembers(void *userdata) if ( selfp ) { - selfp->handleEjectMembers(); + selfp->confirmEjectMembers(); + } +} + +void LLPanelGroupMembersSubTab::confirmEjectMembers() +{ + std::vector selection = mMembersList->getAllSelected(); + if (selection.empty()) return; + + S32 selection_count = selection.size(); + if (selection_count == 1) + { + LLSD args; + std::string fullname; + gCacheName->getFullName(mMembersList->getValue(), fullname); + args["AVATAR_NAME"] = fullname; + LLSD payload; + LLNotificationsUtil::add("EjectGroupMemberWarning", + args, + payload, + boost::bind(&LLPanelGroupMembersSubTab::handleEjectCallback, this, _1, _2)); + } + else + { + LLSD args; + args["COUNT"] = llformat("%d", selection_count); + LLSD payload; + LLNotificationsUtil::add("EjectGroupMembersWarning", + args, + payload, + boost::bind(&LLPanelGroupMembersSubTab::handleEjectCallback, this, _1, _2)); } } @@ -1182,6 +1212,16 @@ void LLPanelGroupMembersSubTab::handleEjectMembers() LLGroupMgr::getInstance()->sendGroupMemberEjects(mGroupID, selected_members); } +bool LLPanelGroupMembersSubTab::handleEjectCallback(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (0 == option) // Eject button + { + handleEjectMembers(); + } + return false; +} + void LLPanelGroupMembersSubTab::sendEjectNotifications(const LLUUID& group_id, const uuid_vec_t& selected_members) { LLGroupMgrGroupData* group_data = LLGroupMgr::getInstance()->getGroupData(group_id); @@ -1804,7 +1844,47 @@ void LLPanelGroupMembersSubTab::updateMembers() void LLPanelGroupMembersSubTab::onBanMember(void* user_data) { LLPanelGroupMembersSubTab* self = static_cast(user_data); - self->handleBanMember(); + self->confirmBanMembers(); +} + +void LLPanelGroupMembersSubTab::confirmBanMembers() +{ + std::vector selection = mMembersList->getAllSelected(); + if (selection.empty()) return; + + S32 selection_count = selection.size(); + if (selection_count == 1) + { + LLSD args; + std::string fullname; + gCacheName->getFullName(mMembersList->getValue(), fullname); + args["AVATAR_NAME"] = fullname; + LLSD payload; + LLNotificationsUtil::add("BanGroupMemberWarning", + args, + payload, + boost::bind(&LLPanelGroupMembersSubTab::handleBanCallback, this, _1, _2)); + } + else + { + LLSD args; + args["COUNT"] = llformat("%d", selection_count); + LLSD payload; + LLNotificationsUtil::add("BanGroupMembersWarning", + args, + payload, + boost::bind(&LLPanelGroupMembersSubTab::handleBanCallback, this, _1, _2)); + } +} + +bool LLPanelGroupMembersSubTab::handleBanCallback(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (0 == option) // Eject button + { + handleBanMember(); + } + return false; } void LLPanelGroupMembersSubTab::handleBanMember() diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index 540b24ada6..9a696124a8 100755 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -171,6 +171,7 @@ public: void handleEjectMembers(); void sendEjectNotifications(const LLUUID& group_id, const uuid_vec_t& selected_members); bool handleEjectCallback(const LLSD& notification, const LLSD& response); + void confirmEjectMembers(); static void onRoleCheck(LLUICtrl* check, void* user_data); void handleRoleCheck(const LLUUID& role_id, @@ -178,6 +179,8 @@ public: static void onBanMember(void* user_data); void handleBanMember(); + bool handleBanCallback(const LLSD& notification, const LLSD& response); + void confirmBanMembers(); void applyMemberChanges(); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 97d1fd0c0f..554afaf386 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -577,6 +577,33 @@ If you no longer wish to have these abilities granted to this role, disable them notext="Cancel" yestext="Eject"/> + + + You are about to ban [AVATAR_NAME] from the group. + group + confirm + + + + You are about to ban [COUNT] members from group. + group + confirm + + Date: Mon, 1 Jun 2015 21:02:35 +0400 Subject: MAINT-4761 FIXED viewer crash (Crash after selecting 'Skin weights' checkbox when uploading the second model.) --- indra/newview/llfloatermodelpreview.cpp | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 2cad67a47f..20760001fd 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -3815,11 +3815,8 @@ void LLModelPreview::loadModelCallback(S32 lod) mFMP->getChild("confirm_checkbox")->set(FALSE); if (!mBaseModel.empty()) { - if (mFMP->getChild("description_form")->getValue().asString().empty()) - { - const std::string& model_name = mBaseModel[0]->getName(); - mFMP->getChild("description_form")->setValue(model_name); - } + const std::string& model_name = mBaseModel[0]->getName(); + mFMP->getChild("description_form")->setValue(model_name); } } refresh(); @@ -5143,8 +5140,11 @@ BOOL LLModelPreview::render() mViewOption["show_skin_weight"] = false; fmp->disableViewOption("show_skin_weight"); fmp->disableViewOption("show_joint_positions"); + + skin_weight = false; + mFMP->childSetValue("show_skin_weight", false); + fmp->setViewOptionEnabled("show_skin_weight", skin_weight); } - skin_weight = false; } if (upload_skin && !has_skin_weights) @@ -5248,6 +5248,16 @@ BOOL LLModelPreview::render() const LLVertexBuffer* buff = vb_vec[0]; regen = buff->hasDataType(LLVertexBuffer::TYPE_WEIGHT4) != skin_weight; } + else + { + LL_INFOS(" ") << "Vertex Buffer[" << mPreviewLOD << "]" << " is EMPTY!!!" << LL_ENDL; + regen = TRUE; + } + } + + if (regen) + { + genBuffers(mPreviewLOD, skin_weight); } //make sure material lists all match @@ -5268,11 +5278,6 @@ BOOL LLModelPreview::render() } } - if (regen) - { - genBuffers(mPreviewLOD, skin_weight); - } - if (!skin_weight) { for (LLMeshUploadThread::instance_list::iterator iter = mUploadData.begin(); iter != mUploadData.end(); ++iter) -- cgit v1.2.3 From afb08192247138b8e8d86671a6dc001e041d1c82 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 3 Jun 2015 12:23:29 +0300 Subject: MAINT-1788 FIXED Cancel changes when clicking Close button or exiting Viewer. --- indra/newview/llfloaterjoystick.cpp | 14 ++++++++++++++ indra/newview/llfloaterjoystick.h | 5 +++++ indra/newview/llfloaterpreference.cpp | 12 +++++++++++- indra/newview/llfloaterpreference.h | 1 + 4 files changed, 31 insertions(+), 1 deletion(-) diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index b7fff6cae3..ee3d633dd0 100755 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -326,7 +326,21 @@ void LLFloaterJoystick::onClickOK(void *joy_panel) } } +void LLFloaterJoystick::onClickCloseBtn(bool app_quitting) +{ + cancel(); + closeFloater(app_quitting); +} + void LLFloaterJoystick::setSNDefaults() { LLViewerJoystick::getInstance()->setSNDefaults(); } + +void LLFloaterJoystick::onClose(bool app_quitting) +{ + if (app_quitting) + { + cancel(); + } +} diff --git a/indra/newview/llfloaterjoystick.h b/indra/newview/llfloaterjoystick.h index 9c3752540d..a1b5951389 100755 --- a/indra/newview/llfloaterjoystick.h +++ b/indra/newview/llfloaterjoystick.h @@ -45,6 +45,11 @@ public: virtual void draw(); static void setSNDefaults(); +protected: + + void onClose(bool app_quitting); + void onClickCloseBtn(bool app_quitting); + private: LLFloaterJoystick(const LLSD& data); diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index ee4396758e..4db1a83396 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -2235,6 +2235,11 @@ void LLFloaterPreferenceProxy::onOpen(const LLSD& key) void LLFloaterPreferenceProxy::onClose(bool app_quitting) { + if(app_quitting) + { + cancel(); + } + if (mSocksSettingsDirty) { @@ -2334,6 +2339,11 @@ void LLFloaterPreferenceProxy::onBtnCancel() cancel(); } +void LLFloaterPreferenceProxy::onClickCloseBtn(bool app_quitting) +{ + cancel(); +} + void LLFloaterPreferenceProxy::cancel() { @@ -2344,7 +2354,7 @@ void LLFloaterPreferenceProxy::cancel() LLSD ctrl_value = iter->second; control->set(ctrl_value); } - + mSocksSettingsDirty = false; closeFloater(); } diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 7bf6ae7d79..b3878457e2 100755 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -269,6 +269,7 @@ protected: void saveSettings(); void onBtnOk(); void onBtnCancel(); + void onClickCloseBtn(bool app_quitting = false); void onChangeSocksSettings(); -- cgit v1.2.3 From ae65d99dd9af6cf730e3fc20eea6f47540332d68 Mon Sep 17 00:00:00 2001 From: vyacheslavsproductengine Date: Wed, 3 Jun 2015 18:04:17 +0400 Subject: MAINT-4446 FIXED R2 (Alpha masking does not work when ALM is enabled if the object has a legacy bump set.) --- .../shaders/class1/deferred/bumpF.glsl | 24 ++++++++++++++-------- indra/newview/lldrawpoolbump.cpp | 1 + 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl b/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl index 595c11fae2..1222503dcc 100755 --- a/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl @@ -31,6 +31,7 @@ out vec4 frag_data[3]; uniform sampler2D diffuseMap; uniform sampler2D bumpMap; +uniform float min_alpha; VARYING vec3 vary_mat0; VARYING vec3 vary_mat1; @@ -47,16 +48,23 @@ vec2 encode_normal(vec3 n) void main() { - vec3 col = vertex_color.rgb * texture2D(diffuseMap, vary_texcoord0.xy).rgb; - vec3 norm = texture2D(bumpMap, vary_texcoord0.xy).rgb * 2.0 - 1.0; + vec4 col = texture2D(diffuseMap, vary_texcoord0.xy); - vec3 tnorm = vec3(dot(norm,vary_mat0), + if (col.a > min_alpha) + { + col *= vertex_color.rgb; + vec3 norm = texture2D(bumpMap, vary_texcoord0.xy).rgb * 2.0 - 1.0; + + vec3 tnorm = vec3(dot(norm,vary_mat0), dot(norm,vary_mat1), dot(norm,vary_mat2)); - frag_data[0] = vec4(col, 0.0); - frag_data[1] = vertex_color.aaaa; // spec - //frag_data[1] = vec4(vec3(vertex_color.a), vertex_color.a+(1.0-vertex_color.a)*vertex_color.a); // spec - from former class3 - maybe better, but not so well tested - vec3 nvn = normalize(tnorm); - frag_data[2] = vec4(encode_normal(nvn.xyz), vertex_color.a, 0.0); + frag_data[0] = vec4(col.rgb, 0.0); + frag_data[1] = vertex_color.aaaa; // spec + //frag_data[1] = vec4(vec3(vertex_color.a), vertex_color.a+(1.0-vertex_color.a)*vertex_color.a); // spec - from former class3 - maybe better, but not so well tested + vec3 nvn = normalize(tnorm); + frag_data[2] = vec4(encode_normal(nvn.xyz), vertex_color.a, 0.0); + } + else + discard; } diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 33f7bc305c..7b9fd5c6c6 100755 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -864,6 +864,7 @@ void LLDrawPoolBump::renderDeferred(S32 pass) { LLDrawInfo& params = **i; + gDeferredBumpProgram.setMinimumAlpha(params.mAlphaMaskCutoff); LLDrawPoolBump::bindBumpMap(params, bump_channel); pushBatch(params, mask, TRUE); } -- cgit v1.2.3 From 5d70ea8d4f7a5029a75e36383c95f2fdd1e8db99 Mon Sep 17 00:00:00 2001 From: vyacheslavsproductengine Date: Wed, 3 Jun 2015 19:57:01 +0400 Subject: Backed out changeset: ebdaabeef422 --- .../shaders/class1/deferred/bumpF.glsl | 24 ++++++++-------------- indra/newview/lldrawpoolbump.cpp | 1 - 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl b/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl index 1222503dcc..595c11fae2 100755 --- a/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl @@ -31,7 +31,6 @@ out vec4 frag_data[3]; uniform sampler2D diffuseMap; uniform sampler2D bumpMap; -uniform float min_alpha; VARYING vec3 vary_mat0; VARYING vec3 vary_mat1; @@ -48,23 +47,16 @@ vec2 encode_normal(vec3 n) void main() { - vec4 col = texture2D(diffuseMap, vary_texcoord0.xy); + vec3 col = vertex_color.rgb * texture2D(diffuseMap, vary_texcoord0.xy).rgb; + vec3 norm = texture2D(bumpMap, vary_texcoord0.xy).rgb * 2.0 - 1.0; - if (col.a > min_alpha) - { - col *= vertex_color.rgb; - vec3 norm = texture2D(bumpMap, vary_texcoord0.xy).rgb * 2.0 - 1.0; - - vec3 tnorm = vec3(dot(norm,vary_mat0), + vec3 tnorm = vec3(dot(norm,vary_mat0), dot(norm,vary_mat1), dot(norm,vary_mat2)); - frag_data[0] = vec4(col.rgb, 0.0); - frag_data[1] = vertex_color.aaaa; // spec - //frag_data[1] = vec4(vec3(vertex_color.a), vertex_color.a+(1.0-vertex_color.a)*vertex_color.a); // spec - from former class3 - maybe better, but not so well tested - vec3 nvn = normalize(tnorm); - frag_data[2] = vec4(encode_normal(nvn.xyz), vertex_color.a, 0.0); - } - else - discard; + frag_data[0] = vec4(col, 0.0); + frag_data[1] = vertex_color.aaaa; // spec + //frag_data[1] = vec4(vec3(vertex_color.a), vertex_color.a+(1.0-vertex_color.a)*vertex_color.a); // spec - from former class3 - maybe better, but not so well tested + vec3 nvn = normalize(tnorm); + frag_data[2] = vec4(encode_normal(nvn.xyz), vertex_color.a, 0.0); } diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 7b9fd5c6c6..33f7bc305c 100755 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -864,7 +864,6 @@ void LLDrawPoolBump::renderDeferred(S32 pass) { LLDrawInfo& params = **i; - gDeferredBumpProgram.setMinimumAlpha(params.mAlphaMaskCutoff); LLDrawPoolBump::bindBumpMap(params, bump_channel); pushBatch(params, mask, TRUE); } -- cgit v1.2.3 From 3f3bac5e913545bcf22e66460bbfec5cb9b655db Mon Sep 17 00:00:00 2001 From: vyacheslavsproductengine Date: Wed, 3 Jun 2015 20:00:53 +0400 Subject: MAINT-4446 FIXED R2 (Alpha masking does not work when ALM is enabled if the object has a legacy bump set.) --- .../shaders/class1/deferred/bumpF.glsl | 24 ++++++++++++++-------- indra/newview/lldrawpoolbump.cpp | 1 + 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl b/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl index 595c11fae2..58fb01d200 100755 --- a/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl @@ -29,6 +29,7 @@ out vec4 frag_data[3]; #define frag_data gl_FragData #endif +uniform float minimum_alpha; uniform sampler2D diffuseMap; uniform sampler2D bumpMap; @@ -47,16 +48,23 @@ vec2 encode_normal(vec3 n) void main() { - vec3 col = vertex_color.rgb * texture2D(diffuseMap, vary_texcoord0.xy).rgb; - vec3 norm = texture2D(bumpMap, vary_texcoord0.xy).rgb * 2.0 - 1.0; + vec4 col = texture2D(diffuseMap, vary_texcoord0.xy); + + if(col.a < minimum_alpha) + { + discard; + } + col *= vertex_color; + + vec3 norm = texture2D(bumpMap, vary_texcoord0.xy).rgb * 2.0 - 1.0; - vec3 tnorm = vec3(dot(norm,vary_mat0), + vec3 tnorm = vec3(dot(norm,vary_mat0), dot(norm,vary_mat1), dot(norm,vary_mat2)); - frag_data[0] = vec4(col, 0.0); - frag_data[1] = vertex_color.aaaa; // spec - //frag_data[1] = vec4(vec3(vertex_color.a), vertex_color.a+(1.0-vertex_color.a)*vertex_color.a); // spec - from former class3 - maybe better, but not so well tested - vec3 nvn = normalize(tnorm); - frag_data[2] = vec4(encode_normal(nvn.xyz), vertex_color.a, 0.0); + frag_data[0] = vec4(col.rgb, 0.0); + frag_data[1] = vertex_color.aaaa; // spec + //frag_data[1] = vec4(vec3(vertex_color.a), vertex_color.a+(1.0-vertex_color.a)*vertex_color.a); // spec - from former class3 - maybe better, but not so well tested + vec3 nvn = normalize(tnorm); + frag_data[2] = vec4(encode_normal(nvn), vertex_color.a, 0.0); } diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 33f7bc305c..7b9fd5c6c6 100755 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -864,6 +864,7 @@ void LLDrawPoolBump::renderDeferred(S32 pass) { LLDrawInfo& params = **i; + gDeferredBumpProgram.setMinimumAlpha(params.mAlphaMaskCutoff); LLDrawPoolBump::bindBumpMap(params, bump_channel); pushBatch(params, mask, TRUE); } -- cgit v1.2.3 From fda0c3eb590f39fe04347da0182ba38ab87e8bc2 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 4 Jun 2015 12:50:16 +0300 Subject: MAINT-1693 FIXED Building Block Type is changed to Torus after cancel changing of texture for sculpted object --- indra/newview/llpanelobject.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index dcd0aab3ab..420f8fde2e 100755 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -2000,7 +2000,11 @@ void LLPanelObject::onCancelSculpt(const LLSD& data) LLTextureCtrl* mTextureCtrl = getChild("sculpt texture control"); if(!mTextureCtrl) return; - + + if(mSculptTextureRevert == LLUUID::null) + { + mSculptTextureRevert = LLUUID(SCULPT_DEFAULT_TEXTURE); + } mTextureCtrl->setImageAssetID(mSculptTextureRevert); sendSculpt(); -- cgit v1.2.3 From c62fc3e36e36934e9f5f9264b15188b9133f9875 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 4 Jun 2015 18:09:16 +0300 Subject: MAINT-2346 FIXED Show the amount of allowed and banned residents. --- indra/newview/llfloaterland.cpp | 3 +++ indra/newview/skins/default/xui/en/floater_about_land.xml | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 5ec9a96be7..6f64bcc945 100755 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -2403,6 +2403,8 @@ void LLPanelLandAccess::refresh() mListAccess->clearSortOrder(); mListAccess->deleteAllItems(); S32 count = parcel->mAccessList.size(); + getChild("AllowedText")->setTextArg("[COUNT]", llformat("%d",count)); + getChild("AccessList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count)); getChild("AccessList")->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST)); @@ -2448,6 +2450,7 @@ void LLPanelLandAccess::refresh() mListBanned->clearSortOrder(); mListBanned->deleteAllItems(); S32 count = parcel->mBanList.size(); + getChild("BanCheck")->setTextArg("[COUNT]", llformat("%d",count)); getChild("BannedList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count)); getChild("BannedList")->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST)); diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index d72937ac63..4850d46400 100755 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -2013,7 +2013,7 @@ Only large parcels can be listed in search. name="AllowedText" top="0" width="230"> - Allowed Residents + Allowed Residents ([COUNT]) - Banned Residents + Banned Residents ([COUNT]) Date: Thu, 4 Jun 2015 18:25:28 +0300 Subject: MAINT-5240 FIXED Viewer will request the full group member list for group chat in some cases --- indra/newview/llspeakers.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 7867e1573c..bc92f2a416 100755 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -547,18 +547,17 @@ void LLSpeakerMgr::updateSpeakerList() // For groups, we need to hit the group manager. // Note: The session uuid and the group uuid are actually one and the same. If that was to change, this will fail. LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(session_id); - F32 large_group_delay = 0.f; - if (gdatap) - { - //This is a viewer-side bandaid for maint-4414 it does not fix the core issue. - large_group_delay = (F32)(gdatap->mMemberCount / 5000); - } - - const F32 load_group_timeout = gSavedSettings.getF32("ChatLoadGroupTimeout") + large_group_delay; - - if (!gdatap && (mGetListTime.getElapsedTimeF32() >= load_group_timeout)) + + if (!gdatap || !gdatap->isGroupPropertiesDataComplete()) + { + // Request group properties first. This is to avoid fetching lagre member lists here. See MAINT-5240 + LLGroupMgr::getInstance()->sendGroupPropertiesRequest(session_id); + } + else if (gdatap && gdatap->isGroupPropertiesDataComplete() + && !gdatap->isMemberDataComplete() && gdatap->mMemberCount < 5000 + && mGetListTime.getElapsedTimeF32() >= gSavedSettings.getF32("ChatLoadGroupTimeout")) { - // Request the data the first time around + // Request the member list data the first time around LLGroupMgr::getInstance()->sendCapGroupMembersRequest(session_id); } else if (gdatap && gdatap->isMemberDataComplete() && !gdatap->mMembers.empty()) -- cgit v1.2.3 From 71209a51af1f2069938653a0de8b9af0e42b56d6 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Thu, 4 Jun 2015 19:40:21 +0300 Subject: MAINT-5240 FIXED Per Kelly, added delay to GroupPropertiesRequest too --- indra/newview/llspeakers.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index bc92f2a416..cb3ab93e2a 100755 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -548,7 +548,8 @@ void LLSpeakerMgr::updateSpeakerList() // Note: The session uuid and the group uuid are actually one and the same. If that was to change, this will fail. LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(session_id); - if (!gdatap || !gdatap->isGroupPropertiesDataComplete()) + if (!gdatap || !gdatap->isGroupPropertiesDataComplete() + && mGetListTime.getElapsedTimeF32() >= gSavedSettings.getF32("ChatLoadGroupTimeout")) { // Request group properties first. This is to avoid fetching lagre member lists here. See MAINT-5240 LLGroupMgr::getInstance()->sendGroupPropertiesRequest(session_id); -- cgit v1.2.3 From dbaec6a34e45ffdd90d09b291dce79b3fafd520c Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 3 Jun 2015 20:37:26 +0300 Subject: MAINT-4764 Investigate object updates for better child/root drawing on viewer --- indra/newview/llvoavatar.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 6e0d77b10a..b731f242ce 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6073,6 +6073,7 @@ void LLVOAvatar::getOffObject() } // assumes that transform will not be updated with drawable still having a parent + // or that drawable had no parent from the start LLVector3 cur_position_world = mDrawable->getWorldPosition(); LLQuaternion cur_rotation_world = mDrawable->getWorldRotation(); @@ -6251,6 +6252,7 @@ void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color) BOOL LLVOAvatar::isVisible() const { return mDrawable.notNull() + && (!mOrphaned || isSelf()) && (mDrawable->isVisible() || mIsDummy); } -- cgit v1.2.3 From 77b4f1d51c6e9d2b7d6711bfa38912ba4682c320 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 5 Jun 2015 13:06:04 +0300 Subject: build fix --- indra/newview/llspeakers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index cb3ab93e2a..aac67b8774 100755 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -548,7 +548,7 @@ void LLSpeakerMgr::updateSpeakerList() // Note: The session uuid and the group uuid are actually one and the same. If that was to change, this will fail. LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(session_id); - if (!gdatap || !gdatap->isGroupPropertiesDataComplete() + if ((!gdatap || !gdatap->isGroupPropertiesDataComplete()) && mGetListTime.getElapsedTimeF32() >= gSavedSettings.getF32("ChatLoadGroupTimeout")) { // Request group properties first. This is to avoid fetching lagre member lists here. See MAINT-5240 -- cgit v1.2.3 From a2bd04ca244f55fe807c9e9d74311580f12e6d0f Mon Sep 17 00:00:00 2001 From: vyacheslavsproductengine Date: Fri, 5 Jun 2015 20:53:16 +0400 Subject: MAINT-5186 FIXED (Avatar textures do not load in the Appearance editor after disabling an Alpha mask) --- indra/newview/llpaneleditwearable.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 9bd6007772..b7e1b2d3a4 100755 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -1168,6 +1168,8 @@ void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, BOOL show, BO targetPanel->setVisible(show); toggleTypeSpecificControls(type); + // Update type controls here + updateTypeSpecificControls(type); if (show) { @@ -1179,7 +1181,6 @@ void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, BOOL show, BO mNameEditor->setText(mWearableItem->getName()); updatePanelPickerControls(type); - updateTypeSpecificControls(type); // clear and rebuild visual param list U8 num_subparts = wearable_entry->mSubparts.size(); -- cgit v1.2.3 From 9a13f4270b502036de01be531b17ba3a0e82e548 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 8 Jun 2015 11:56:14 +0300 Subject: MAINT-14 FIXED Treat region message like a system message, but also show sender name. --- indra/newview/llchathistory.cpp | 4 ++++ indra/newview/llviewermessage.cpp | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index b81b95462e..df6fe99fdb 100755 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -376,6 +376,10 @@ public: || mSourceType == CHAT_SOURCE_SYSTEM) { mFrom = LLTrans::getString("SECOND_LIFE"); + if(!chat.mFromName.empty()) + { + mFrom += " (" + chat.mFromName + ")"; + } user_name->setValue(mFrom); updateMinUserNameWidth(); } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index f5350a0b30..3f22dc9b59 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2347,7 +2347,8 @@ static void god_message_name_cb(const LLAvatarName& av_name, LLChat chat, std::s LLNotificationsUtil::add("GodMessage", args); // Treat like a system message and put in chat history. - chat.mText = av_name.getCompleteName() + ": " + message; + chat.mSourceType = CHAT_SOURCE_SYSTEM; + chat.mText = message; LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance("nearby_chat"); if (nearby_chat) -- cgit v1.2.3 From a63ab891dc02550a79a4cad42e3157cf334afa0e Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Mon, 8 Jun 2015 06:51:05 +0300 Subject: MAINT-5240 FIXED Viewer will request the full group member list for group chat in some cases - need to remove this --- indra/newview/llspeakers.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index aac67b8774..44c980c96f 100755 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -548,20 +548,7 @@ void LLSpeakerMgr::updateSpeakerList() // Note: The session uuid and the group uuid are actually one and the same. If that was to change, this will fail. LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(session_id); - if ((!gdatap || !gdatap->isGroupPropertiesDataComplete()) - && mGetListTime.getElapsedTimeF32() >= gSavedSettings.getF32("ChatLoadGroupTimeout")) - { - // Request group properties first. This is to avoid fetching lagre member lists here. See MAINT-5240 - LLGroupMgr::getInstance()->sendGroupPropertiesRequest(session_id); - } - else if (gdatap && gdatap->isGroupPropertiesDataComplete() - && !gdatap->isMemberDataComplete() && gdatap->mMemberCount < 5000 - && mGetListTime.getElapsedTimeF32() >= gSavedSettings.getF32("ChatLoadGroupTimeout")) - { - // Request the member list data the first time around - LLGroupMgr::getInstance()->sendCapGroupMembersRequest(session_id); - } - else if (gdatap && gdatap->isMemberDataComplete() && !gdatap->mMembers.empty()) + if (gdatap && gdatap->isMemberDataComplete() && !gdatap->mMembers.empty()) { // Add group members when we get the complete list (note: can take a while before we get that list) LLGroupMgrGroupData::member_list_t::iterator member_it = gdatap->mMembers.begin(); -- cgit v1.2.3 From 99d827e15bb6bbf7acfc54b3a7fcf6881f33ecc4 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Mon, 8 Jun 2015 06:55:22 +0300 Subject: MAINT-5237 FIXED Everyone Roles are not allowed to view the member's list but the Viewer claims that it is retrieving the member list --- indra/newview/llgroupmgr.cpp | 17 ++++++++++++----- indra/newview/llpanelgrouproles.cpp | 10 ++++++++-- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 86f9da6318..6b4e242e3a 100755 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -2083,11 +2083,6 @@ void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content) return; } - // If we have no members, there's no reason to do anything else - S32 num_members = content["member_count"]; - if(num_members < 1) - return; - LLUUID group_id = content["group_id"].asUUID(); LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id); @@ -2097,6 +2092,18 @@ void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content) return; } + // If we have no members, there's no reason to do anything else + S32 num_members = content["member_count"]; + if (num_members < 1) + { + LL_INFOS("GrpMgr") << "Received empty group members list for group id: " << group_id.asString() << LL_ENDL; + // Set mMemberDataComplete for correct handling of empty responses. See MAINT-5237 + group_datap->mMemberDataComplete = true; + group_datap->mChanged = TRUE; + LLGroupMgr::getInstance()->notifyObservers(GC_MEMBER_DATA); + return; + } + group_datap->mMemberCount = num_members; LLSD member_list = content["members"]; diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 2b7028827b..00c204e702 100755 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -1679,7 +1679,13 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc) { // Build a string with info on retrieval progress. std::ostringstream retrieved; - if ( !gdatap->isMemberDataComplete() ) + + if ( gdatap->isRoleDataComplete() && gdatap->isMemberDataComplete() && !gdatap->mMembers.size() ) + { + // MAINT-5237 + retrieved << "Member list not available."; + } + else if ( !gdatap->isMemberDataComplete() ) { // Still busy retreiving member list. retrieved << "Retrieving member list (" << gdatap->mMembers.size() @@ -1826,7 +1832,7 @@ void LLPanelGroupMembersSubTab::updateMembers() { mMembersList->setEnabled(TRUE); } - else + else if (gdatap->mMembers.size()) { mMembersList->setEnabled(FALSE); mMembersList->setCommentText(std::string("No match.")); -- cgit v1.2.3 From 1f1b5dc51df5bc5c8d0729adcef1f5cedcbf82c0 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 8 Jun 2015 16:25:59 +0300 Subject: MAINT-5230 FIXED Viewer gets stuck clearing texture cache --- indra/newview/lltexturecache.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index ef852bc905..bcdf8360ed 100755 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1544,17 +1544,20 @@ void LLTextureCache::purgeAllTextures(bool purge_directories) { std::string dirname = mTexturesDirName + delem + subdirs[i]; LL_INFOS() << "Deleting files in directory: " << dirname << LL_ENDL; - gDirUtilp->deleteFilesInDir(dirname, mask); if (purge_directories) { - LLFile::rmdir(dirname); + gDirUtilp->deleteDirAndContents(dirname); + } + else + { + gDirUtilp->deleteFilesInDir(dirname, mask); } } if (purge_directories) { gDirUtilp->deleteFilesInDir(mTexturesDirName, mask); LLFile::rmdir(mTexturesDirName); - } + } } mHeaderIDMap.clear(); mTexturesSizeMap.clear(); -- cgit v1.2.3 From ee4289ade5ea84f978cc71efcf1b3275650eb624 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Tue, 9 Jun 2015 05:03:52 +0300 Subject: MAINT-5270 FIXED Group members of large groups in a role which has "Invite people to this group" ability are not able to send group invites from RC regions --- indra/newview/llpanelgroupinvite.cpp | 92 +++++++++++++++++++----------------- 1 file changed, 48 insertions(+), 44 deletions(-) diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp index e662a05dfc..866cb8dbef 100755 --- a/indra/newview/llpanelgroupinvite.cpp +++ b/indra/newview/llpanelgroupinvite.cpp @@ -243,56 +243,59 @@ void LLPanelGroupInvite::impl::addRoleNames(LLGroupMgrGroupData* gdatap) LLGroupMgrGroupData::member_list_t::iterator agent_iter = gdatap->mMembers.find(gAgent.getID()); + //loop over the agent's roles in the group + //then add those roles to the list of roles that the agent + //can invite people to be. + //if the user is the owner then we add + //all of the roles in the group, + //else if they have the add to roles power + //we add every role but owner, + //else if they have the limited add to roles power + //we add every role the user is in, + //else we just add to everyone + bool is_owner = FALSE; + bool can_assign_any = gAgent.hasPowerInGroup(mGroupID, + GP_ROLE_ASSIGN_MEMBER); + bool can_assign_limited = gAgent.hasPowerInGroup(mGroupID, + GP_ROLE_ASSIGN_MEMBER_LIMITED); + LLGroupMemberData* member_data = NULL; //get the member data for the agent if it exists - if ( agent_iter != gdatap->mMembers.end() ) + if (agent_iter != gdatap->mMembers.end()) { - LLGroupMemberData* member_data = (*agent_iter).second; - - //loop over the agent's roles in the group - //then add those roles to the list of roles that the agent - //can invite people to be - if ( member_data && mRoleNames) + member_data = (*agent_iter).second; + if (member_data && mRoleNames) { - //if the user is the owner then we add - //all of the roles in the group - //else if they have the add to roles power - //we add every role but owner, - //else if they have the limited add to roles power - //we add every role the user is in - //else we just add to everyone - bool is_owner = member_data->isOwner(); - bool can_assign_any = gAgent.hasPowerInGroup(mGroupID, - GP_ROLE_ASSIGN_MEMBER); - bool can_assign_limited = gAgent.hasPowerInGroup(mGroupID, - GP_ROLE_ASSIGN_MEMBER_LIMITED); + is_owner = member_data->isOwner(); + }//end if member data is not null + }//end if agent is in the group + - LLGroupMgrGroupData::role_list_t::iterator rit = gdatap->mRoles.begin(); - LLGroupMgrGroupData::role_list_t::iterator end = gdatap->mRoles.end(); - //populate the role list - for ( ; rit != end; ++rit) + LLGroupMgrGroupData::role_list_t::iterator rit = gdatap->mRoles.begin(); + LLGroupMgrGroupData::role_list_t::iterator end = gdatap->mRoles.end(); + + //populate the role list: + for ( ; rit != end; ++rit) + { + LLUUID role_id = (*rit).first; + LLRoleData rd; + if ( gdatap->getRoleData(role_id,rd) ) + { + // Owners can add any role. + if ( is_owner + // Even 'can_assign_any' can't add owner role. + || (can_assign_any && role_id != gdatap->mOwnerRole) + // Add all roles user is in + || (can_assign_limited && member_data && member_data->isInRole(role_id)) + // Everyone role. + || role_id == LLUUID::null ) { - LLUUID role_id = (*rit).first; - LLRoleData rd; - if ( gdatap->getRoleData(role_id,rd) ) - { - // Owners can add any role. - if ( is_owner - // Even 'can_assign_any' can't add owner role. - || (can_assign_any && role_id != gdatap->mOwnerRole) - // Add all roles user is in - || (can_assign_limited && member_data->isInRole(role_id)) - // Everyone role. - || role_id == LLUUID::null ) - { - mRoleNames->add(rd.mRoleName, - role_id, - ADD_BOTTOM); - } - } + mRoleNames->add(rd.mRoleName, + role_id, + ADD_BOTTOM); } - }//end if member data is not null - }//end if agent is in the group + } + } } //static @@ -579,7 +582,8 @@ void LLPanelGroupInvite::updateLists() { waiting = true; } - if (gdatap->isRoleDataComplete() && gdatap->isMemberDataComplete() && gdatap->isRoleMemberDataComplete()) + if (gdatap->isRoleDataComplete() && gdatap->isMemberDataComplete() + && (gdatap->isRoleMemberDataComplete() || !gdatap->mMembers.size())) // MAINT-5270: large groups receives an empty members list without some powers, so RoleMemberData wouldn't be complete for them { if ( mImplementation->mRoleNames ) { -- cgit v1.2.3 From beeb8d8bc8f4fb2d3ec90016be7b256e4e880958 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 10 Jun 2015 12:05:51 +0300 Subject: MAINT-797 FIXED Hide Place profile panel and related buttons when opening pick panel. --- indra/newview/llpanelplaces.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 4bcd932d4b..a9a0c30e26 100755 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -921,7 +921,12 @@ void LLPanelPlaces::onBackButtonClicked() void LLPanelPlaces::togglePickPanel(BOOL visible) { if (mPickPanel) + { mPickPanel->setVisible(visible); + mPlaceProfile->setVisible(!visible); + updateVerbs(); + } + } void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible) @@ -1141,16 +1146,21 @@ void LLPanelPlaces::updateVerbs() bool is_agent_place_info_visible = mPlaceInfoType == AGENT_INFO_TYPE; bool is_create_landmark_visible = mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE; + bool is_pick_panel_visible = false; + if(mPickPanel) + { + is_pick_panel_visible = mPickPanel->isInVisibleChain(); + } bool have_3d_pos = ! mPosGlobal.isExactlyZero(); - mTeleportBtn->setVisible(!is_create_landmark_visible && !isLandmarkEditModeOn); - mShowOnMapBtn->setVisible(!is_create_landmark_visible && !isLandmarkEditModeOn); + mTeleportBtn->setVisible(!is_create_landmark_visible && !isLandmarkEditModeOn && !is_pick_panel_visible); + mShowOnMapBtn->setVisible(!is_create_landmark_visible && !isLandmarkEditModeOn && !is_pick_panel_visible); mOverflowBtn->setVisible(is_place_info_visible && !is_create_landmark_visible && !isLandmarkEditModeOn); mEditBtn->setVisible(mPlaceInfoType == LANDMARK_INFO_TYPE && !isLandmarkEditModeOn); mSaveBtn->setVisible(isLandmarkEditModeOn); mCancelBtn->setVisible(isLandmarkEditModeOn); mCloseBtn->setVisible(is_create_landmark_visible && !isLandmarkEditModeOn); - mPlaceInfoBtn->setVisible(!is_place_info_visible && !is_create_landmark_visible && !isLandmarkEditModeOn); + mPlaceInfoBtn->setVisible(!is_place_info_visible && !is_create_landmark_visible && !isLandmarkEditModeOn && !is_pick_panel_visible); mPlaceInfoBtn->setEnabled(!is_create_landmark_visible && !isLandmarkEditModeOn && have_3d_pos); -- cgit v1.2.3 From 68f27e663ea62f018a8d4d2fcc82ffcd2109760c Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 9 Jun 2015 19:21:04 +0300 Subject: MAINT-4893 FIXED Investigate a viewer option to limit rendering avatar near 0,0,0 and avoid ugly rendering glitches --- indra/newview/llvoavatar.cpp | 20 ++++++++++++++++---- indra/newview/llvoavatar.h | 2 ++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index b731f242ce..60796fec78 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -159,6 +159,9 @@ const F32 HEAD_MOVEMENT_AVG_TIME = 0.9f; const S32 MORPH_MASK_REQUESTED_DISCARD = 0; +const F32 MAX_STANDOFF_FROM_ORIGIN = 3; +const F32 MAX_STANDOFF_DISTANCE_CHANGE = 32; + // Discard level at which to switch to baked textures // Should probably be 4 or 3, but didn't want to change it while change other logic - SJB const S32 SWITCH_TO_BAKED_DISCARD = 5; @@ -2131,7 +2134,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time) // animate the character // store off last frame's root position to be consistent with camera position - LLVector3 root_pos_last = mRoot->getWorldPosition(); + mLastRootPos = mRoot->getWorldPosition(); BOOL detailed_update = updateCharacter(agent); static LLUICachedControl visualizers_in_calls("ShowVoiceVisualizersInCalls", false); @@ -2149,7 +2152,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time) idleUpdateWindEffect(); } - idleUpdateNameTag( root_pos_last ); + idleUpdateNameTag( mLastRootPos ); idleUpdateRenderCost(); } @@ -6053,10 +6056,10 @@ void LLVOAvatar::getOffObject() { return; } - + LLViewerObject* sit_object = (LLViewerObject*)getParent(); - if (sit_object) + if (sit_object) { stopMotionFromSource(sit_object->getID()); LLFollowCamMgr::setCameraActive(sit_object->getID(), FALSE); @@ -6077,6 +6080,15 @@ void LLVOAvatar::getOffObject() LLVector3 cur_position_world = mDrawable->getWorldPosition(); LLQuaternion cur_rotation_world = mDrawable->getWorldRotation(); + if (mLastRootPos.length() >= MAX_STANDOFF_FROM_ORIGIN + && (cur_position_world.length() < MAX_STANDOFF_FROM_ORIGIN + || dist_vec(cur_position_world, mLastRootPos) > MAX_STANDOFF_DISTANCE_CHANGE)) + { + // Most likely drawable got updated too early or some updates were missed - we got relative position to non-existing parent + // restore coordinates from cache + cur_position_world = mLastRootPos; + } + // set *local* position based on last *world* position, since we're unparenting the avatar mDrawable->mXform.setPosition(cur_position_world); mDrawable->mXform.setRotation(cur_rotation_world); diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 1c3f4f2aa7..5b4379165a 100755 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -869,6 +869,8 @@ public: private: // set this property only with LLVOAvatar::sitDown method BOOL mIsSitting; + // position backup in case of missing data + LLVector3 mLastRootPos; /** Hierarchy ** ** -- cgit v1.2.3 From d201f49ce38194477a73d515909e0a8dc25baf16 Mon Sep 17 00:00:00 2001 From: pavelkproductengine Date: Thu, 4 Jun 2015 20:03:20 +0300 Subject: MAINT-5137 FIXED Warning sometimes appears at login - Alert: There was a problem Added logic to resend HTTP request for default perms saving --- indra/newview/llfloaterperms.cpp | 86 ++++++++++++++++++++++++++++++---------- indra/newview/llfloaterperms.h | 33 +++++++++++++++ 2 files changed, 98 insertions(+), 21 deletions(-) diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index 042cf47070..04a818c2c0 100755 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -166,15 +166,59 @@ void LLFloaterPermsDefault::onCommitCopy(const LLSD& user_data) xfer->setEnabled(copyable); } -class LLFloaterPermsResponder : public LLHTTPClient::Responder +const int MAX_HTTP_RETRIES = 5; +LLFloaterPermsRequester* LLFloaterPermsRequester::sPermsRequester = NULL; + +LLFloaterPermsRequester::LLFloaterPermsRequester(const std::string url, const LLSD report, + int maxRetries) + : mRetriesCount(0), mMaxRetries(maxRetries), mUrl(url), mReport(report) +{} + +//static +void LLFloaterPermsRequester::init(const std::string url, const LLSD report, int maxRetries) +{ + if (sPermsRequester == NULL) { + sPermsRequester = new LLFloaterPermsRequester(url, report, maxRetries); + } +} + +//static +void LLFloaterPermsRequester::finalize() +{ + if (sPermsRequester != NULL) + { + delete sPermsRequester; + sPermsRequester = NULL; + } +} + +//static +LLFloaterPermsRequester* LLFloaterPermsRequester::instance() +{ + return sPermsRequester; +} + +void LLFloaterPermsRequester::start() { -public: - LLFloaterPermsResponder(): LLHTTPClient::Responder() {} -private: - static std::string sPreviousReason; + ++mRetriesCount; + LLHTTPClient::post(mUrl, mReport, new LLFloaterPermsResponder()); +} + +bool LLFloaterPermsRequester::retry() +{ + if (++mRetriesCount < mMaxRetries) + { + LLHTTPClient::post(mUrl, mReport, new LLFloaterPermsResponder()); + return true; + } + return false; +} - void httpFailure() +void LLFloaterPermsResponder::httpFailure() +{ + if (!LLFloaterPermsRequester::instance() || !LLFloaterPermsRequester::instance()->retry()) { + LLFloaterPermsRequester::finalize(); const std::string& reason = getReason(); // Do not display the same error more than once in a row if (reason != sPreviousReason) @@ -185,27 +229,27 @@ private: LLNotificationsUtil::add("DefaultObjectPermissions", args); } } +} - void httpSuccess() - { - //const LLSD& content = getContent(); - //dump_sequential_xml("perms_responder_result.xml", content); - - // Since we have had a successful POST call be sure to display the next error message - // even if it is the same as a previous one. - sPreviousReason = ""; - LLFloaterPermsDefault::setCapSent(true); - LL_INFOS("ObjectPermissionsFloater") << "Default permissions successfully sent to simulator" << LL_ENDL; - } -}; +void LLFloaterPermsResponder::httpSuccess() +{ + //const LLSD& content = getContent(); + //dump_sequential_xml("perms_responder_result.xml", content); - std::string LLFloaterPermsResponder::sPreviousReason; + // Since we have had a successful POST call be sure to display the next error message + // even if it is the same as a previous one. + sPreviousReason = ""; + LL_INFOS("ObjectPermissionsFloater") << "Default permissions successfully sent to simulator" << LL_ENDL; +} + +std::string LLFloaterPermsResponder::sPreviousReason; void LLFloaterPermsDefault::sendInitialPerms() { if(!mCapSent) { updateCap(); + setCapSent(true); } } @@ -230,8 +274,8 @@ void LLFloaterPermsDefault::updateCap() LLSDSerialize::toPrettyXML(report, sent_perms_log); LL_CONT << sent_perms_log.str() << LL_ENDL; } - - LLHTTPClient::post(object_url, report, new LLFloaterPermsResponder()); + LLFloaterPermsRequester::init(object_url, report, MAX_HTTP_RETRIES); + LLFloaterPermsRequester::instance()->start(); } else { diff --git a/indra/newview/llfloaterperms.h b/indra/newview/llfloaterperms.h index 2bb0a19dc1..45ee510423 100755 --- a/indra/newview/llfloaterperms.h +++ b/indra/newview/llfloaterperms.h @@ -29,6 +29,7 @@ #define LL_LLFLOATERPERMPREFS_H #include "llfloater.h" +#include "llhttpclient.h" class LLFloaterPerms : public LLFloater { @@ -89,4 +90,36 @@ private: bool mNextOwnerTransfer[CAT_LAST]; }; +class LLFloaterPermsRequester +{ +public: + LLFloaterPermsRequester(const std::string url, const LLSD report, int maxRetries); + + static void LLFloaterPermsRequester::init(const std::string url, const LLSD report, int maxRetries); + static void LLFloaterPermsRequester::finalize(); + static LLFloaterPermsRequester* LLFloaterPermsRequester::instance(); + + void LLFloaterPermsRequester::start(); + bool LLFloaterPermsRequester::retry(); + +private: + int mRetriesCount; + int mMaxRetries; + const std::string mUrl; + const LLSD mReport; +public: + static LLFloaterPermsRequester* sPermsRequester; +}; + +class LLFloaterPermsResponder : public LLHTTPClient::Responder +{ +public: + LLFloaterPermsResponder() : LLHTTPClient::Responder() {} +private: + static std::string sPreviousReason; + + void httpFailure(); + void httpSuccess(); +}; + #endif -- cgit v1.2.3 From addaef9fa509edafca91d804061d73ad0ac7a397 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 11 Jun 2015 12:19:52 +0300 Subject: build fix --- indra/newview/llfloaterperms.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/indra/newview/llfloaterperms.h b/indra/newview/llfloaterperms.h index 45ee510423..d3b52c1fe5 100755 --- a/indra/newview/llfloaterperms.h +++ b/indra/newview/llfloaterperms.h @@ -95,12 +95,12 @@ class LLFloaterPermsRequester public: LLFloaterPermsRequester(const std::string url, const LLSD report, int maxRetries); - static void LLFloaterPermsRequester::init(const std::string url, const LLSD report, int maxRetries); - static void LLFloaterPermsRequester::finalize(); - static LLFloaterPermsRequester* LLFloaterPermsRequester::instance(); + static void init(const std::string url, const LLSD report, int maxRetries); + static void finalize(); + static LLFloaterPermsRequester* instance(); - void LLFloaterPermsRequester::start(); - bool LLFloaterPermsRequester::retry(); + void start(); + bool retry(); private: int mRetriesCount; -- cgit v1.2.3 From 251cccd76c8eb1c1ab2422c5cfcd3d7ef9bd9454 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Wed, 10 Jun 2015 17:52:47 +0300 Subject: MAINT-4297 (Mesh models sometimes fail to load completely) MAINT-4449 (Starter avatars deformed or missing alpha under some conditions / graphics cards / LOD ) BUG-7239 (Starter avatars deformed or missing alpha under some conditions / graphics cards / LOD) The reason of problem on avatar (or one of avatar attachments) "deformed" it's selected volume (LLVolume) with a lower LOD. How it works. Why it happens? Each LLVOVolume object has variable mLOD which is indicate which is LLVolume should be assigned to LLPrimitive::mVolumep. The assigment happens in LLVOVolume::setVolume which is call LLPrimitive::setVolume, which is then lookup desired volume in LLVolumeMgr class which is keep as I understand all volume groups for all objects in scene. The data (mesh) for LLVolume class is loading from LL servers by http, and if sucessfully the variable LLVolume::mIsMeshAssetLoaded assigned to true. But sometimes the data may not be ready, and in this case the LLVOVolume::setVolume make request for download mesh (to the LLMeshRepository) and setup one of available lod. All of this things happens in (see: LLVOVolume::setVolume, code: block if (!getVolume()->isMeshAssetLoaded() {...}) When LLMeshRepository sucessfully download the mesh it's set (as I said above LLVolume::mIsMeshAssetLoaded, LLVolume::setMeshAssetLoaded()) and then also notify LLVOVolume::notifyMeshLoaded() about it. This causes add LLVOVolume::mDrawable into the pipline build list (see LLVOVolume::notifyMeshLoaded()) and set LLVOVolume::mSculptChanged; In order to process it later in LLVOVolume::updateGeometry (In order to see the mechanism of LLPipiline build list processing set bp in this method and see the stack). After the LLDrawable will be processed it will be removed form the build queue also all falgs will be reseted (see the end of LLVOVolume::updateGeometry). And here is the problem in variable-flag's "*Changed" processing (in LLVOVolume::updateGeometry): What if by the time of processing the mFaceMappingChanged also will be set (due to other changes in engine)? It means that LLVOVolume::setVolume will not be called and LLPrimitive::mVolumep remain unchaged and would point to the LLVolume for a lower LOD. My changes intended for fix this problem. BTW this is true for not only for standard avatar's. The reason why it is well visible on standard avatars is because it has a more "ugly" lower-LOD-s, than on avatars which is was loaded by the SL-users. For example on my DudtPank avatars I didn't see big difference between LOD-0 and LOD-3. If you want you can "play" with it in LLVOVolume::calcLOD() with add code if(getAvatar() && getAvatar()->isSelf()) { mLOD = } --- indra/newview/llvovolume.cpp | 138 ++++++++++++++++++++++++------------------- indra/newview/llvovolume.h | 4 ++ 2 files changed, 80 insertions(+), 62 deletions(-) diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index f435fd754b..cae67907dd 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1624,6 +1624,66 @@ static LLTrace::BlockTimerStatHandle FTM_GEN_FLEX("Generate Flexies"); static LLTrace::BlockTimerStatHandle FTM_UPDATE_PRIMITIVES("Update Primitives"); static LLTrace::BlockTimerStatHandle FTM_UPDATE_RIGGED_VOLUME("Update Rigged"); +bool LLVOVolume::lodOrSculptChanged(LLDrawable *drawable, BOOL &compiled) +{ + bool regen_faces = false; + + LLVolume *old_volumep, *new_volumep; + F32 old_lod, new_lod; + S32 old_num_faces, new_num_faces; + + old_volumep = getVolume(); + old_lod = old_volumep->getDetail(); + old_num_faces = old_volumep->getNumFaces(); + old_volumep = NULL; + + { + LL_RECORD_BLOCK_TIME(FTM_GEN_VOLUME); + LLVolumeParams volume_params = getVolume()->getParams(); + setVolume(volume_params, 0); + } + + new_volumep = getVolume(); + new_lod = new_volumep->getDetail(); + new_num_faces = new_volumep->getNumFaces(); + new_volumep = NULL; + + if ((new_lod != old_lod) || mSculptChanged) + { + compiled = TRUE; + sNumLODChanges += new_num_faces; + + if ((S32)getNumTEs() != getVolume()->getNumFaces()) + { + setNumTEs(getVolume()->getNumFaces()); //mesh loading may change number of faces. + } + + drawable->setState(LLDrawable::REBUILD_VOLUME); // for face->genVolumeTriangles() + + { + LL_RECORD_BLOCK_TIME(FTM_GEN_TRIANGLES); + regen_faces = new_num_faces != old_num_faces || mNumFaces != (S32)getNumTEs(); + if (regen_faces) + { + regenFaces(); + } + + if (mSculptChanged) + { //changes in sculpt maps can thrash an object bounding box without + //triggering a spatial group bounding box update -- force spatial group + //to update bounding boxes + LLSpatialGroup* group = mDrawable->getSpatialGroup(); + if (group) + { + group->unbound(); + } + } + } + } + + return regen_faces; +} + BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) { LL_RECORD_BLOCK_TIME(FTM_UPDATE_PRIMITIVES); @@ -1664,83 +1724,37 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) return TRUE; // No update to complete } - if (mVolumeChanged || mFaceMappingChanged ) + boost::function fn_lod_or_sculpt_changed = boost::bind(&LLVOVolume::lodOrSculptChanged, this, drawable, boost::ref(compiled)); + + if (mVolumeChanged || mFaceMappingChanged) { dirtySpatialGroup(drawable->isState(LLDrawable::IN_REBUILD_Q1)); - compiled = TRUE; + bool was_regen_faces = false; if (mVolumeChanged) { - LL_RECORD_BLOCK_TIME(FTM_GEN_VOLUME); - LLVolumeParams volume_params = getVolume()->getParams(); - setVolume(volume_params, 0); + was_regen_faces = fn_lod_or_sculpt_changed(); drawable->setState(LLDrawable::REBUILD_VOLUME); } - + else if (mSculptChanged) { + compiled = TRUE; + was_regen_faces = fn_lod_or_sculpt_changed(); + } + + if (!was_regen_faces) { LL_RECORD_BLOCK_TIME(FTM_GEN_TRIANGLES); regenFaces(); - genBBoxes(FALSE); } + + genBBoxes(FALSE); } - else if ((mLODChanged) || (mSculptChanged)) + else if (mLODChanged || mSculptChanged) { dirtySpatialGroup(drawable->isState(LLDrawable::IN_REBUILD_Q1)); - - LLVolume *old_volumep, *new_volumep; - F32 old_lod, new_lod; - S32 old_num_faces, new_num_faces ; - - old_volumep = getVolume(); - old_lod = old_volumep->getDetail(); - old_num_faces = old_volumep->getNumFaces() ; - old_volumep = NULL ; - - { - LL_RECORD_BLOCK_TIME(FTM_GEN_VOLUME); - LLVolumeParams volume_params = getVolume()->getParams(); - setVolume(volume_params, 0); - } - - new_volumep = getVolume(); - new_lod = new_volumep->getDetail(); - new_num_faces = new_volumep->getNumFaces() ; - new_volumep = NULL ; - - if ((new_lod != old_lod) || mSculptChanged) - { - compiled = TRUE; - sNumLODChanges += new_num_faces ; - - if((S32)getNumTEs() != getVolume()->getNumFaces()) - { - setNumTEs(getVolume()->getNumFaces()); //mesh loading may change number of faces. - } - - drawable->setState(LLDrawable::REBUILD_VOLUME); // for face->genVolumeTriangles() - - { - LL_RECORD_BLOCK_TIME(FTM_GEN_TRIANGLES); - if (new_num_faces != old_num_faces || mNumFaces != (S32)getNumTEs()) - { - regenFaces(); - } - genBBoxes(FALSE); - - if (mSculptChanged) - { //changes in sculpt maps can thrash an object bounding box without - //triggering a spatial group bounding box update -- force spatial group - //to update bounding boxes - LLSpatialGroup* group = mDrawable->getSpatialGroup(); - if (group) - { - group->unbound(); - } - } - } - } - + compiled = TRUE; + fn_lod_or_sculpt_changed(); genBBoxes(FALSE); } // it has its own drawable (it's moved) or it has changed UVs or it has changed xforms from global<->local diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index 3e33bbd71c..ff7438ac09 100755 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -339,6 +339,10 @@ protected: void cleanUpMediaImpls(); void addMediaImpl(LLViewerMediaImpl* media_impl, S32 texture_index) ; void removeMediaImpl(S32 texture_index) ; + +private: + bool lodOrSculptChanged(LLDrawable *drawable, BOOL &compiled); + public: static S32 getRenderComplexityMax() {return mRenderComplexity_last;} -- cgit v1.2.3 From 70a31d5c6b8872e72c5a90098afc9165d8d020b1 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 11 Jun 2015 12:57:18 +0300 Subject: MAINT-14 FIXED Region message logged into nearby chat log has duplicated sender name --- indra/newview/llchathistory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index df6fe99fdb..dc0835eb1c 100755 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -376,7 +376,7 @@ public: || mSourceType == CHAT_SOURCE_SYSTEM) { mFrom = LLTrans::getString("SECOND_LIFE"); - if(!chat.mFromName.empty()) + if(!chat.mFromName.empty() && (mFrom != chat.mFromName)) { mFrom += " (" + chat.mFromName + ")"; } -- cgit v1.2.3 From ec3c0c4ae104cf8a926af1fcb082fe52438fd505 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 11 Jun 2015 13:31:59 +0300 Subject: MAINT-1723 FIXED Restore snapshots from trash to Photo album folder. --- indra/newview/llinventorybridge.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index be71c54650..ddf72bc8cf 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1572,7 +1572,9 @@ void LLItemBridge::restoreItem() if(item) { LLInventoryModel* model = getInventoryModel(); - const LLUUID new_parent = model->findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(item->getType())); + bool is_snapshot = (item->getInventoryType() == LLInventoryType::IT_SNAPSHOT); + + const LLUUID new_parent = model->findCategoryUUIDForType(is_snapshot? LLFolderType::FT_SNAPSHOT_CATEGORY : LLFolderType::assetTypeToFolderType(item->getType())); // do not restamp on restore. LLInvFVBridge::changeItemParent(model, item, new_parent, FALSE); } -- cgit v1.2.3 From f851d453dcccdf029f5cda6f90c34561cc116236 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 11 Jun 2015 19:30:02 +0300 Subject: MAINT-5269 FIXED Viewer crashes if you open Help -> About Second Life while a group member list is loading. --- indra/newview/llfloaterabout.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index b342d8fdf3..e71daa6067 100755 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -289,15 +289,11 @@ void LLServerReleaseNotesURLFetcher::httpCompleted() LL_DEBUGS("ServerReleaseNotes") << dumpResponse() << " [headers:" << getResponseHeaders() << "]" << LL_ENDL; - LLFloaterAbout* floater_about = LLFloaterReg::getTypedInstance("sl_about"); - if (floater_about) + std::string location = getResponseHeader(HTTP_IN_HEADER_LOCATION); + if (location.empty()) { - std::string location = getResponseHeader(HTTP_IN_HEADER_LOCATION); - if (location.empty()) - { - location = LLTrans::getString("ErrorFetchingServerReleaseNotesURL"); - } - LLAppViewer::instance()->setServerReleaseNotesURL(location); + location = LLTrans::getString("ErrorFetchingServerReleaseNotesURL"); } + LLAppViewer::instance()->setServerReleaseNotesURL(location); } -- cgit v1.2.3 From ad635e9f0eb32df227e96d5c5fd751a36ef61d92 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 12 Jun 2015 12:02:28 +0300 Subject: MAINT-4900 FIXED Don't show group info for non-admins. --- indra/newview/llagent.cpp | 2 +- indra/newview/llpanelgroup.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 359171c5bd..6f2c1859e4 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -2843,7 +2843,7 @@ BOOL LLAgent::isInGroup(const LLUUID& group_id, BOOL ignore_god_mode /* FALSE */ // This implementation should mirror LLAgentInfo::hasPowerInGroup BOOL LLAgent::hasPowerInGroup(const LLUUID& group_id, U64 power) const { - if (isGodlike()) + if (isGodlikeWithoutAdminMenuFakery()) return true; // GP_NO_POWERS can also mean no power is enough to grant an ability. diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index f4aab6bd4e..74e67a7b61 100755 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -336,7 +336,7 @@ void LLPanelGroup::update(LLGroupChange gc) group_name_ctrl->setToolTip(group_name); LLGroupData agent_gdatap; - bool is_member = gAgent.getGroupData(mID,agent_gdatap) || gAgent.isGodlike(); + bool is_member = gAgent.getGroupData(mID,agent_gdatap) || gAgent.isGodlikeWithoutAdminMenuFakery(); bool join_btn_visible = !is_member && gdatap->mOpenEnrollment; mButtonJoin->setVisible(join_btn_visible); @@ -462,7 +462,7 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) } LLGroupData agent_gdatap; - bool is_member = gAgent.getGroupData(mID,agent_gdatap) || gAgent.isGodlike(); + bool is_member = gAgent.getGroupData(mID,agent_gdatap) || gAgent.isGodlikeWithoutAdminMenuFakery(); tab_roles->setVisible(is_member); tab_notices->setVisible(is_member); -- cgit v1.2.3 From 91c45fa3ba456f4d9ffcf59d511657172b81ae52 Mon Sep 17 00:00:00 2001 From: vyacheslavsproductengine Date: Wed, 17 Jun 2015 20:02:05 +0400 Subject: MAINT-5207 FIXED (Build: Snap to grid / Grid options broken, object snaps to incorrect Units) MAINT-5208 FIXED (Grid Lines Changing Scale Depending on Distance from Camera) --- indra/newview/llmanipscale.cpp | 16 ++++++++-------- indra/newview/llmaniptranslate.cpp | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index 407613d32c..85faa70552 100755 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -1677,12 +1677,12 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) F32 alpha = (1.f - (1.f * ((F32)llabs(i) / (F32)num_ticks_per_side1))); LLVector3 tick_pos = mScaleCenter + (mScaleDir * (grid_multiple1 + i) * smallest_subdivision1); - F32 cur_subdivisions = llclamp(getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit1, mTickPixelSpacing1), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); - - if (fmodf((F32)(i + sub_div_offset_1), (sGridMaxSubdivisionLevel / cur_subdivisions)) != 0.f) + //No need check this condition to prevent tick position scaling (FIX MAINT-5207/5208) + //F32 cur_subdivisions = llclamp(getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit1, mTickPixelSpacing1), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); + /*if (fmodf((F32)(i + sub_div_offset_1), (sGridMaxSubdivisionLevel / cur_subdivisions)) != 0.f) { continue; - } + }*/ F32 tick_scale = 1.f; for (F32 division_level = sGridMaxSubdivisionLevel; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f) @@ -1710,12 +1710,12 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) F32 alpha = (1.f - (1.f * ((F32)llabs(i) / (F32)num_ticks_per_side2))); LLVector3 tick_pos = mScaleCenter + (mScaleDir * (grid_multiple2 + i) * smallest_subdivision2); - F32 cur_subdivisions = llclamp(getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit2, mTickPixelSpacing2), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); - - if (fmodf((F32)(i + sub_div_offset_2), (sGridMaxSubdivisionLevel / cur_subdivisions)) != 0.f) + //No need check this condition to prevent tick position scaling (FIX MAINT-5207/5208) + //F32 cur_subdivisions = llclamp(getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit2, mTickPixelSpacing2), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); + /*if (fmodf((F32)(i + sub_div_offset_2), (sGridMaxSubdivisionLevel / cur_subdivisions)) != 0.f) { continue; - } + }*/ F32 tick_scale = 1.f; for (F32 division_level = sGridMaxSubdivisionLevel; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f) diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index 394db71fb9..b4259a456c 100755 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -1285,12 +1285,12 @@ void LLManipTranslate::renderSnapGuides() { tick_start = selection_center + (translate_axis * (smallest_grid_unit_scale * (F32)i - offset_nearest_grid_unit)); - F32 cur_subdivisions = getSubdivisionLevel(tick_start, translate_axis, getMinGridScale()); - - if (fmodf((F32)(i + sub_div_offset), (max_subdivisions / cur_subdivisions)) != 0.f) + //No need check this condition to prevent tick position scaling (FIX MAINT-5207/5208) + //F32 cur_subdivisions = getSubdivisionLevel(tick_start, translate_axis, getMinGridScale()); + /*if (fmodf((F32)(i + sub_div_offset), (max_subdivisions / cur_subdivisions)) != 0.f) { continue; - } + }*/ // add in off-axis offset tick_start += (mSnapOffsetAxis * mSnapOffsetMeters); -- cgit v1.2.3 From 11b48840c7835d6849ea65cf4e88ecda329d0db2 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 16 Jun 2015 20:18:27 +0300 Subject: MAINT-5250 Viewer should handle large number of calling cards better --- indra/newview/llappviewer.cpp | 1 + indra/newview/llcallingcard.cpp | 25 ++++++++++++++++++++++--- indra/newview/llcallingcard.h | 3 +++ 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index abbfe25fe2..2bb154ca04 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4923,6 +4923,7 @@ void LLAppViewer::idle() gIdleCallbacks.callFunctions(); gInventory.idleNotifyObservers(); + LLAvatarTracker::instance().idleNotifyObservers(); } // Metrics logging (LLViewerAssetStats, etc.) diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index b6c5496c17..f79d1aa609 100755 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -97,7 +97,8 @@ static void on_avatar_name_cache_notify(const LLUUID& agent_id, LLAvatarTracker::LLAvatarTracker() : mTrackingData(NULL), mTrackedAgentValid(false), - mModifyMask(0x0) + mModifyMask(0x0), + mIsNotifyObservers(FALSE) { } @@ -272,7 +273,7 @@ S32 LLAvatarTracker::addBuddyList(const LLAvatarTracker::buddy_map_t& buds) << "]" << LL_ENDL; } } - notifyObservers(); + // do not notify observers here - list can be large so let it be done on idle. return new_buddy_count; } @@ -473,8 +474,25 @@ void LLAvatarTracker::removeObserver(LLFriendObserver* observer) mObservers.end()); } +void LLAvatarTracker::idleNotifyObservers() +{ + if (mModifyMask == LLFriendObserver::NONE && mChangedBuddyIDs.size() == 0) + { + return; + } + notifyObservers(); +} + void LLAvatarTracker::notifyObservers() { + if (mIsNotifyObservers) + { + // Don't allow multiple calls. + // new masks and ids will be processed later from idle. + return; + } + mIsNotifyObservers = TRUE; + observer_list_t observers(mObservers); observer_list_t::iterator it = observers.begin(); observer_list_t::iterator end = observers.end(); @@ -490,6 +508,7 @@ void LLAvatarTracker::notifyObservers() mModifyMask = LLFriendObserver::NONE; mChangedBuddyIDs.clear(); + mIsNotifyObservers = FALSE; } void LLAvatarTracker::addParticularFriendObserver(const LLUUID& buddy_id, LLFriendObserver* observer) @@ -531,7 +550,7 @@ void LLAvatarTracker::notifyParticularFriendObservers(const LLUUID& buddy_id) // store flag for change // and id of object change applies to void LLAvatarTracker::addChangedMask(U32 mask, const LLUUID& referent) -{ +{ mModifyMask |= mask; if (referent.notNull()) { diff --git a/indra/newview/llcallingcard.h b/indra/newview/llcallingcard.h index 6e5fc01cd8..1f819a42fd 100755 --- a/indra/newview/llcallingcard.h +++ b/indra/newview/llcallingcard.h @@ -143,6 +143,7 @@ public: // observers left behind. void addObserver(LLFriendObserver* observer); void removeObserver(LLFriendObserver* observer); + void idleNotifyObservers(); void notifyObservers(); // Observers interested in updates of a particular avatar. @@ -209,6 +210,8 @@ private: LLAvatarTracker(const LLAvatarTracker&); bool operator==(const LLAvatarTracker&); + BOOL mIsNotifyObservers; + public: // don't you dare create or delete this object LLAvatarTracker(); -- cgit v1.2.3 From e998f1427ff1cd0fbdfb7f69b39720e19ec0a7d0 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 19 Jun 2015 16:21:50 +0300 Subject: MAINT-5274 missing inventory count --- indra/newview/llpanelmaininventory.cpp | 2 +- indra/newview/skins/default/xui/en/panel_main_inventory.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 7aaf9510eb..4229419fce 100755 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -604,7 +604,7 @@ void LLPanelMainInventory::updateItemcountText() } else { - text = getString("ItemcountUnknown"); + text = getString("ItemcountUnknown", string_args); } mCounterCtrl->setValue(text); diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml index 0518688f45..0a85477bf4 100755 --- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml @@ -21,7 +21,7 @@ - + Fetched [ITEM_COUNT] Items [FILTER] Date: Tue, 23 Jun 2015 12:47:54 +0300 Subject: MAINT-5001 FIXED Logging in and then quickly logging out removes stored favorite login locations --- indra/newview/llagentdata.cpp | 1 + indra/newview/llagentdata.h | 1 + indra/newview/llfavoritesbar.cpp | 384 ++++++++++++++++++++-------------- indra/newview/llfavoritesbar.h | 26 ++- indra/newview/llfloaterpreference.cpp | 13 +- indra/newview/llfloaterpreference.h | 2 +- indra/newview/llstartup.cpp | 18 ++ 7 files changed, 279 insertions(+), 166 deletions(-) diff --git a/indra/newview/llagentdata.cpp b/indra/newview/llagentdata.cpp index 5f6a082d75..d2c644a06f 100755 --- a/indra/newview/llagentdata.cpp +++ b/indra/newview/llagentdata.cpp @@ -31,3 +31,4 @@ LLUUID gAgentID; LLUUID gAgentSessionID; +std::string gAgentUsername; diff --git a/indra/newview/llagentdata.h b/indra/newview/llagentdata.h index 83d6a53d5e..efdd97f6c4 100755 --- a/indra/newview/llagentdata.h +++ b/indra/newview/llagentdata.h @@ -30,5 +30,6 @@ extern LLUUID gAgentID; extern LLUUID gAgentSessionID; +extern std::string gAgentUsername; #endif diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index f2b369a9ad..8f3eaaa207 100755 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -380,9 +380,11 @@ LLFavoritesBarCtrl::LLFavoritesBarCtrl(const LLFavoritesBarCtrl::Params& p) mShowDragMarker(FALSE), mLandingTab(NULL), mLastTab(NULL), - mTabsHighlightEnabled(TRUE) - , mUpdateDropDownItems(true) -, mRestoreOverflowMenu(false) + mTabsHighlightEnabled(TRUE), + mUpdateDropDownItems(true), + mRestoreOverflowMenu(false), + mGetPrevItems(true), + mItemsChangedTimer() { // Register callback for menus with current registrar (will be parent panel's registrar) LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Favorites.DoToSelected", @@ -659,6 +661,15 @@ void LLFavoritesBarCtrl::changed(U32 mask) LLFavoritesOrderStorage::instance().getSLURL((*i)->getAssetUUID()); } updateButtons(); + if (!mItemsChangedTimer.getStarted()) + { + mItemsChangedTimer.start(); + } + else + { + mItemsChangedTimer.reset(); + } + } } @@ -693,6 +704,21 @@ void LLFavoritesBarCtrl::draw() // Once drawn, mark this false so we won't draw it again (unless we hit the favorite bar again) mShowDragMarker = FALSE; } + if (mItemsChangedTimer.getStarted()) + { + if (mItemsChangedTimer.getElapsedTimeF32() > 1.f) + { + LLFavoritesOrderStorage::instance().saveFavoritesRecord(); + mItemsChangedTimer.stop(); + } + } + + if(!mItemsChangedTimer.getStarted() && LLFavoritesOrderStorage::instance().mUpdateRequired) + { + LLFavoritesOrderStorage::instance().mUpdateRequired = false; + mItemsChangedTimer.start(); + } + } const LLButton::Params& LLFavoritesBarCtrl::getButtonParams() @@ -723,6 +749,12 @@ void LLFavoritesBarCtrl::updateButtons() return; } + if(mGetPrevItems) + { + LLFavoritesOrderStorage::instance().mPrevFavorites = mItems; + mGetPrevItems = false; + } + const LLButton::Params& button_params = getButtonParams(); if(mItems.empty()) @@ -844,6 +876,7 @@ void LLFavoritesBarCtrl::updateButtons() { mUpdateDropDownItems = false; } + } LLButton* LLFavoritesBarCtrl::createButton(const LLPointer item, const LLButton::Params& button_params, S32 x_offset) @@ -912,9 +945,11 @@ BOOL LLFavoritesBarCtrl::postBuild() BOOL LLFavoritesBarCtrl::collectFavoriteItems(LLInventoryModel::item_array_t &items) { + if (mFavoriteFolderId.isNull()) return FALSE; + LLInventoryModel::cat_array_t cats; LLIsType is_type(LLAssetType::AT_LANDMARK); @@ -1411,6 +1446,7 @@ void LLFavoritesBarCtrl::insertItem(LLInventoryModel::item_array_t& items, const const std::string LLFavoritesOrderStorage::SORTING_DATA_FILE_NAME = "landmarks_sorting.xml"; const S32 LLFavoritesOrderStorage::NO_INDEX = -1; +bool LLFavoritesOrderStorage::mSaveOnExit = false; void LLFavoritesOrderStorage::setSortIndex(const LLViewerInventoryItem* inv_item, S32 sort_index) { @@ -1447,6 +1483,7 @@ void LLFavoritesOrderStorage::getSLURL(const LLUUID& asset_id) LL_DEBUGS("FavoritesBar") << "landmark for " << asset_id << " already loaded" << LL_ENDL; onLandmarkLoaded(asset_id, lm); } + return; } // static @@ -1482,13 +1519,16 @@ void LLFavoritesOrderStorage::destroyClass() LLFile::remove(old_filename); } - if (gSavedPerAccountSettings.getBOOL("ShowFavoritesOnLogin")) - { - LLFavoritesOrderStorage::instance().saveFavoritesSLURLs(); - } - else + std::string filename = getSavedOrderFileName(); + file.open(filename.c_str()); + if (file.is_open()) { - LLFavoritesOrderStorage::instance().removeFavoritesRecordOfUser(); + file.close(); + LLFile::remove(filename); + if(mSaveOnExit) + { + LLFavoritesOrderStorage::instance().saveFavoritesRecord(true); + } } } @@ -1503,108 +1543,57 @@ std::string LLFavoritesOrderStorage::getSavedOrderFileName() void LLFavoritesOrderStorage::load() { - // load per-resident sorting information std::string filename = getSavedOrderFileName(); - LLSD settings_llsd; llifstream file; file.open(filename.c_str()); if (file.is_open()) { LLSDSerialize::fromXML(settings_llsd, file); - LL_INFOS("FavoritesBar") << "loaded favorites order from '" << filename << "' " - << (settings_llsd.isMap() ? "" : "un") << "successfully" - << LL_ENDL; - file.close(); - } - else - { - LL_WARNS("FavoritesBar") << "unable to open favorites order file at '" << filename << "'" << LL_ENDL; - } - - for (LLSD::map_const_iterator iter = settings_llsd.beginMap(); - iter != settings_llsd.endMap(); ++iter) - { - mSortIndexes.insert(std::make_pair(LLUUID(iter->first), (S32)iter->second.asInteger())); + LL_INFOS("FavoritesBar") << "loaded favorites order from '" << filename << "' " + << (settings_llsd.isMap() ? "" : "un") << "successfully" + << LL_ENDL; + file.close(); + mSaveOnExit = true; + + for (LLSD::map_const_iterator iter = settings_llsd.beginMap(); + iter != settings_llsd.endMap(); ++iter) + { + mSortIndexes.insert(std::make_pair(LLUUID(iter->first), (S32)iter->second.asInteger())); + } } -} - -void LLFavoritesOrderStorage::saveFavoritesSLURLs() -{ - // Do not change the file if we are not logged in yet. - if (!LLLoginInstance::getInstance()->authSuccess()) + else { - LL_WARNS("FavoritesBar") << "Cannot save favorites: not logged in" << LL_ENDL; - return; + filename = getStoredFavoritesFilename(); + if (!filename.empty()) + { + llifstream in_file; + in_file.open(filename.c_str()); + LLSD fav_llsd; + LLSD user_llsd; + if (in_file.is_open()) + { + LLSDSerialize::fromXML(fav_llsd, in_file); + LL_INFOS("FavoritesBar") << "loaded favorites from '" << filename << "' " + << (fav_llsd.isMap() ? "" : "un") << "successfully" + << LL_ENDL; + in_file.close(); + user_llsd = fav_llsd[gAgentUsername]; + + S32 index = 0; + for (LLSD::array_iterator iter = user_llsd.beginArray(); + iter != user_llsd.endArray(); ++iter) + { + mSortIndexes.insert(std::make_pair(iter->get("id").asUUID(), index)); + index++; + } + } + else + { + LL_WARNS("FavoritesBar") << "unable to open favorites from '" << filename << "'" << LL_ENDL; + } + } } - - std::string filename = getStoredFavoritesFilename(); - if (!filename.empty()) - { - llifstream in_file; - in_file.open(filename.c_str()); - LLSD fav_llsd; - if (in_file.is_open()) - { - LLSDSerialize::fromXML(fav_llsd, in_file); - LL_INFOS("FavoritesBar") << "loaded favorites from '" << filename << "' " - << (fav_llsd.isMap() ? "" : "un") << "successfully" - << LL_ENDL; - in_file.close(); - } - else - { - LL_WARNS("FavoritesBar") << "unable to open favorites from '" << filename << "'" << LL_ENDL; - } - - const LLUUID fav_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); - LLInventoryModel::cat_array_t cats; - LLInventoryModel::item_array_t items; - gInventory.collectDescendents(fav_id, cats, items, LLInventoryModel::EXCLUDE_TRASH); - - LLSD user_llsd; - for (LLInventoryModel::item_array_t::iterator it = items.begin(); it != items.end(); it++) - { - LLSD value; - value["name"] = (*it)->getName(); - value["asset_id"] = (*it)->getAssetUUID(); - - slurls_map_t::iterator slurl_iter = mSLURLs.find(value["asset_id"]); - if (slurl_iter != mSLURLs.end()) - { - LL_DEBUGS("FavoritesBar") << "Saving favorite: idx=" << LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID()) << ", SLURL=" << slurl_iter->second << ", value=" << value << LL_ENDL; - value["slurl"] = slurl_iter->second; - user_llsd[LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID())] = value; - } - else - { - LL_WARNS("FavoritesBar") << "Not saving favorite " << value["name"] << ": no matching SLURL" << LL_ENDL; - } - } - - LLAvatarName av_name; - LLAvatarNameCache::get( gAgentID, &av_name ); - // Note : use the "John Doe" and not the "john.doe" version of the name - // as we'll compare it with the stored credentials in the login panel. - fav_llsd[av_name.getUserName()] = user_llsd; - - llofstream file; - file.open(filename.c_str()); - if ( file.is_open() ) - { - LLSDSerialize::toPrettyXML(fav_llsd, file); - LL_INFOS("FavoritesBar") << "saved favorites for '" << av_name.getUserName() - << "' to '" << filename << "' " - << LL_ENDL; - file.close(); - } - else - { - LL_WARNS("FavoritesBar") << "unable to open favorites storage for '" << av_name.getUserName() - << "' at '" << filename << "' " - << LL_ENDL; - } - } } void LLFavoritesOrderStorage::removeFavoritesRecordOfUser() @@ -1626,8 +1615,30 @@ void LLFavoritesOrderStorage::removeFavoritesRecordOfUser() // See saveFavoritesSLURLs() here above for the reason why. if (fav_llsd.has(av_name.getUserName())) { - LL_INFOS("FavoritesBar") << "Removed favorites for " << av_name.getUserName() << LL_ENDL; - fav_llsd.erase(av_name.getUserName()); + LLSD user_llsd = fav_llsd[av_name.getUserName()]; + + if (user_llsd.beginArray()->has("id")) + { + for (LLSD::array_iterator iter = user_llsd.beginArray();iter != user_llsd.endArray(); ++iter) + { + LLSD value; + value["id"]= iter->get("id").asUUID(); + iter->assign(value); + } + fav_llsd[av_name.getUserName()] = user_llsd; + llofstream file; + file.open(filename.c_str()); + if ( file.is_open() ) + { + LLSDSerialize::toPrettyXML(fav_llsd, file); + file.close(); + } + } + else + { + LL_INFOS("FavoritesBar") << "Removed favorites for " << av_name.getUserName() << LL_ENDL; + fav_llsd.erase(av_name.getUserName()); + } } llofstream out_file; @@ -1648,20 +1659,20 @@ void LLFavoritesOrderStorage::onLandmarkLoaded(const LLUUID& asset_id, LLLandmar if (landmark) { LL_DEBUGS("FavoritesBar") << "landmark for " << asset_id << " loaded" << LL_ENDL; - LLVector3d pos_global; - if (!landmark->getGlobalPos(pos_global)) - { - // If global position was unknown on first getGlobalPos() call - // it should be set for the subsequent calls. - landmark->getGlobalPos(pos_global); - } + LLVector3d pos_global; + if (!landmark->getGlobalPos(pos_global)) + { + // If global position was unknown on first getGlobalPos() call + // it should be set for the subsequent calls. + landmark->getGlobalPos(pos_global); + } - if (!pos_global.isExactlyZero()) - { - LL_DEBUGS("FavoritesBar") << "requesting slurl for landmark " << asset_id << LL_ENDL; - LLLandmarkActions::getSLURLfromPosGlobal(pos_global, + if (!pos_global.isExactlyZero()) + { + LL_DEBUGS("FavoritesBar") << "requesting slurl for landmark " << asset_id << LL_ENDL; + LLLandmarkActions::getSLURLfromPosGlobal(pos_global, boost::bind(&LLFavoritesOrderStorage::storeFavoriteSLURL, this, asset_id, _1)); - } + } } } @@ -1671,41 +1682,6 @@ void LLFavoritesOrderStorage::storeFavoriteSLURL(const LLUUID& asset_id, std::st mSLURLs[asset_id] = slurl; } -void LLFavoritesOrderStorage::save() -{ - if (mIsDirty) - { - // something changed, so save it - std::string filename = LLFavoritesOrderStorage::getInstance()->getSavedOrderFileName(); - if (!filename.empty()) - { - LLSD settings_llsd; - - for(sort_index_map_t::const_iterator iter = mSortIndexes.begin(); iter != mSortIndexes.end(); ++iter) - { - settings_llsd[iter->first.asString()] = iter->second; - } - - llofstream file; - file.open(filename.c_str()); - if ( file.is_open() ) - { - LLSDSerialize::toPrettyXML(settings_llsd, file); - LL_INFOS("FavoritesBar") << "saved favorites order to '" << filename << "' " << LL_ENDL; - } - else - { - LL_WARNS("FavoritesBar") << "failed to open favorites order file '" << filename << "' " << LL_ENDL; - } - } - else - { - LL_DEBUGS("FavoritesBar") << "no user directory available to store favorites order file" << LL_ENDL; - } - } -} - - void LLFavoritesOrderStorage::cleanup() { // nothing to clean @@ -1720,7 +1696,7 @@ void LLFavoritesOrderStorage::cleanup() sort_index_map_t aTempMap; //copy unremoved values from mSortIndexes to aTempMap - std::remove_copy_if(mSortIndexes.begin(), mSortIndexes.end(), + std::remove_copy_if(mSortIndexes.begin(), mSortIndexes.end(), inserter(aTempMap, aTempMap.begin()), is_not_in_fav); @@ -1752,8 +1728,8 @@ void LLFavoritesOrderStorage::saveOrder() void LLFavoritesOrderStorage::saveItemsOrder( const LLInventoryModel::item_array_t& items ) { - int sortField = 0; + int sortField = 0; // current order is saved by setting incremental values (1, 2, 3, ...) for the sort field for (LLInventoryModel::item_array_t::const_iterator i = items.begin(); i != items.end(); ++i) { @@ -1793,6 +1769,110 @@ void LLFavoritesOrderStorage::rearrangeFavoriteLandmarks(const LLUUID& source_it saveItemsOrder(items); } +BOOL LLFavoritesOrderStorage::saveFavoritesRecord(bool pref_changed) +{ + + LLUUID favorite_folder= gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); + if (favorite_folder.isNull()) + return FALSE; + + LLInventoryModel::item_array_t items; + LLInventoryModel::cat_array_t cats; + + LLIsType is_type(LLAssetType::AT_LANDMARK); + gInventory.collectDescendentsIf(favorite_folder, cats, items, LLInventoryModel::EXCLUDE_TRASH, is_type); + + std::sort(items.begin(), items.end(), LLFavoritesSort()); + + if((items != mPrevFavorites) || pref_changed) + { + std::string filename = getStoredFavoritesFilename(); + if (!filename.empty()) + { + llifstream in_file; + in_file.open(filename.c_str()); + LLSD fav_llsd; + if (in_file.is_open()) + { + LLSDSerialize::fromXML(fav_llsd, in_file); + in_file.close(); + } + else + { + LL_WARNS("FavoritesBar") << "unable to open favorites from '" << filename << "'" << LL_ENDL; + } + + LLSD user_llsd; + S32 fav_iter = 0; + for (LLInventoryModel::item_array_t::iterator it = items.begin(); it != items.end(); it++) + { + LLSD value; + if (gSavedPerAccountSettings.getBOOL("ShowFavoritesOnLogin")) + { + value["name"] = (*it)->getName(); + value["asset_id"] = (*it)->getAssetUUID(); + value["id"] = (*it)->getUUID(); + slurls_map_t::iterator slurl_iter = mSLURLs.find(value["asset_id"]); + if (slurl_iter != mSLURLs.end()) + { + value["slurl"] = slurl_iter->second; + user_llsd[fav_iter] = value; + } + else + { + getSLURL((*it)->getAssetUUID()); + mUpdateRequired = true; + return FALSE; + } + } + else + { + value["id"] = (*it)->getUUID(); + user_llsd[fav_iter] = value; + } + + fav_iter ++; + } + + LLAvatarName av_name; + LLAvatarNameCache::get( gAgentID, &av_name ); + // Note : use the "John Doe" and not the "john.doe" version of the name + // as we'll compare it with the stored credentials in the login panel. + fav_llsd[av_name.getUserName()] = user_llsd; + llofstream file; + file.open(filename.c_str()); + if ( file.is_open() ) + { + LLSDSerialize::toPrettyXML(fav_llsd, file); + file.close(); + mSaveOnExit = false; + } + else + { + LL_WARNS("FavoritesBar") << "unable to open favorites storage for '" << av_name.getUserName() + << "' at '" << filename << "' " << LL_ENDL; + } + } + + mPrevFavorites = items; + } + + return TRUE; + +} + +void LLFavoritesOrderStorage::showFavoritesOnLoginChanged(BOOL show) +{ + if (show) + { + saveFavoritesRecord(true); + } + else + { + removeFavoritesRecordOfUser(); + } +} + void AddFavoriteLandmarkCallback::fire(const LLUUID& inv_item_id) { if (mTargetLandmarkId.isNull()) return; diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h index a370724947..66fc8b2ae7 100755 --- a/indra/newview/llfavoritesbar.h +++ b/indra/newview/llfavoritesbar.h @@ -105,8 +105,10 @@ protected: bool mUpdateDropDownItems; bool mRestoreOverflowMenu; - LLUUID mSelectedItemID; + bool mGetPrevItems; + LLUUID mSelectedItemID; + LLFrameTimer mItemsChangedTimer; LLUIImage* mImageDragIndication; private: @@ -204,12 +206,23 @@ public: * @see cleanup() */ static void destroyClass(); + static std::string getStoredFavoritesFilename(); + static std::string getSavedOrderFileName(); + + BOOL saveFavoritesRecord(bool pref_changed = false); + void showFavoritesOnLoginChanged(BOOL show); + + LLInventoryModel::item_array_t mPrevFavorites; + const static S32 NO_INDEX; + static bool mSaveOnExit; + bool mUpdateRequired; + private: friend class LLSingleton; - LLFavoritesOrderStorage() : mIsDirty(false) { load(); } - ~LLFavoritesOrderStorage() { save(); } + LLFavoritesOrderStorage() : mIsDirty(false), mUpdateRequired(false){ load(); } + ~LLFavoritesOrderStorage() {} /** * Removes sort indexes for items which are not in Favorites bar for now. @@ -217,13 +230,8 @@ private: void cleanup(); const static std::string SORTING_DATA_FILE_NAME; - std::string getSavedOrderFileName(); - static std::string getStoredFavoritesFilename(); - - void load(); - void save(); - void saveFavoritesSLURLs(); + void load(); // Remove record of current user's favorites from file on disk. void removeFavoritesRecordOfUser(); diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 4db1a83396..dac610eda1 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -49,6 +49,7 @@ //#include "llfirstuse.h" #include "llfloaterreg.h" #include "llfloaterabout.h" +#include "llfavoritesbar.h" #include "llfloaterhardwaresettings.h" #include "llfloatersidepanelcontainer.h" #include "llfloaterimsession.h" @@ -1919,7 +1920,7 @@ BOOL LLPanelPreference::postBuild() } if (hasChild("favorites_on_login_check", TRUE)) { - getChild("favorites_on_login_check")->setCommitCallback(boost::bind(&showFavoritesOnLoginWarning, _1, _2)); + getChild("favorites_on_login_check")->setCommitCallback(boost::bind(&handleFavoritesOnLoginChanged, _1, _2)); bool show_favorites_at_login = LLPanelLogin::getShowFavorites(); getChild("favorites_on_login_check")->setValue(show_favorites_at_login); } @@ -2004,11 +2005,15 @@ void LLPanelPreference::showFriendsOnlyWarning(LLUICtrl* checkbox, const LLSD& v } } -void LLPanelPreference::showFavoritesOnLoginWarning(LLUICtrl* checkbox, const LLSD& value) +void LLPanelPreference::handleFavoritesOnLoginChanged(LLUICtrl* checkbox, const LLSD& value) { - if (checkbox && checkbox->getValue()) + if (checkbox) { - LLNotificationsUtil::add("FavoritesOnLogin"); + LLFavoritesOrderStorage::instance().showFavoritesOnLoginChanged(checkbox->getValue().asBoolean()); + if(checkbox->getValue()) + { + LLNotificationsUtil::add("FavoritesOnLogin"); + } } } diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index b3878457e2..04e5e37731 100755 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -229,7 +229,7 @@ private: //for "Only friends and groups can call or IM me" static void showFriendsOnlyWarning(LLUICtrl*, const LLSD&); //for "Show my Favorite Landmarks at Login" - static void showFavoritesOnLoginWarning(LLUICtrl* checkbox, const LLSD& value); + static void handleFavoritesOnLoginChanged(LLUICtrl* checkbox, const LLSD& value); typedef std::map string_color_map_t; string_color_map_t mSavedColors; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index c012537e78..ca22f1f17b 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -3218,6 +3218,23 @@ bool process_login_success_response() LLStringUtil::trim(gDisplayName); } } + std::string first_name; + if(response.has("first_name")) + { + first_name = response["first_name"].asString(); + LLStringUtil::replaceChar(first_name, '"', ' '); + LLStringUtil::trim(first_name); + gAgentUsername = first_name; + } + + if(response.has("last_name") && !gAgentUsername.empty() && (gAgentUsername != "Resident")) + { + std::string last_name = response["last_name"].asString(); + LLStringUtil::replaceChar(last_name, '"', ' '); + LLStringUtil::trim(last_name); + gAgentUsername = gAgentUsername + " " + last_name; + } + if(gDisplayName.empty()) { if(response.has("first_name")) @@ -3238,6 +3255,7 @@ bool process_login_success_response() gDisplayName += text; } } + if(gDisplayName.empty()) { gDisplayName.assign(gUserCredential->asString()); -- cgit v1.2.3 From 7cd62f4908218e6cfd176fc8b45a5f1bc4279219 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 22 Jun 2015 19:26:28 +0300 Subject: MAINT-5274 Missing folder arrow --- indra/llui/llfolderviewitem.cpp | 15 +++++++++++++-- indra/llui/llfolderviewitem.h | 4 ++++ indra/llui/llfolderviewmodel.h | 2 ++ indra/newview/llfolderviewmodelinventory.cpp | 23 +++++++++++++++++++++++ indra/newview/llfolderviewmodelinventory.h | 1 + 5 files changed, 43 insertions(+), 2 deletions(-) diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index a369edbc6b..f16cd8e124 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -128,6 +128,7 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p) mSelectPending(FALSE), mLabelStyle( LLFontGL::NORMAL ), mHasVisibleChildren(FALSE), + mIsFolderComplete(true), mLocalIndentation(p.folder_indentation), mIndentation(0), mItemHeight(p.item_height), @@ -672,7 +673,7 @@ void LLFolderViewItem::drawOpenFolderArrow(const Params& default_params, const L // const S32 TOP_PAD = default_params.item_top_pad; - if (hasVisibleChildren()) + if (hasVisibleChildren() || !isFolderComplete()) { LLUIImage* arrow_image = default_params.folder_arrow_image; gl_draw_scaled_rotated_image( @@ -932,6 +933,8 @@ LLFolderViewFolder::LLFolderViewFolder( const LLFolderViewItem::Params& p ): mLastArrangeGeneration( -1 ), mLastCalculatedWidth(0) { + // folder might have children that are not loaded yet. Mark it as incomplete until chance to check it. + mIsFolderComplete = false; } void LLFolderViewFolder::updateLabelRotation() @@ -1014,6 +1017,12 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height ) mHasVisibleChildren = found; } + if (!mIsFolderComplete) + { + mIsFolderComplete = getFolderViewModel()->isFolderComplete(this); + } + + // calculate height as a single item (without any children), and reshapes rectangle to match LLFolderViewItem::arrange( width, height ); @@ -1679,7 +1688,9 @@ void LLFolderViewFolder::setOpenArrangeRecursively(BOOL openitem, ERecurseType r mIsOpen = openitem; if(!was_open && openitem) { - getViewModelItem()->openItem(); + getViewModelItem()->openItem(); + // openItem() will request content, it won't be incomplete + mIsFolderComplete = true; } else if(was_open && !openitem) { diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h index 5ad5731cad..f77d676f46 100755 --- a/indra/llui/llfolderviewitem.h +++ b/indra/llui/llfolderviewitem.h @@ -114,6 +114,7 @@ protected: F32 mControlLabelRotation; LLFolderView* mRoot; bool mHasVisibleChildren, + mIsFolderComplete, // indicates that some children were not loaded/added yet mIsCurSelection, mDragAndDropTarget, mIsMouseOverTitle, @@ -210,6 +211,9 @@ public: BOOL hasVisibleChildren() { return mHasVisibleChildren; } + // true if object can't have children + BOOL isFolderComplete() { return mIsFolderComplete; } + // Call through to the viewed object and return true if it can be // removed. Returns true if it's removed. //virtual BOOL removeRecursively(BOOL single_item); diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h index f6550eae42..8e780c6752 100755 --- a/indra/llui/llfolderviewmodel.h +++ b/indra/llui/llfolderviewmodel.h @@ -122,6 +122,7 @@ public: virtual void filter() = 0; virtual bool contentsReady() = 0; + virtual bool isFolderComplete(class LLFolderViewFolder*) = 0; virtual void setFolderView(LLFolderView* folder_view) = 0; virtual LLFolderViewFilter& getFilter() = 0; virtual const LLFolderViewFilter& getFilter() const = 0; @@ -442,6 +443,7 @@ public: // By default, we assume the content is available. If a network fetch mechanism is implemented for the model, // this method needs to be overloaded and return the relevant fetch status. virtual bool contentsReady() { return true; } + virtual bool isFolderComplete(LLFolderViewFolder* folder) { return true; } struct ViewModelCompare { diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp index 3271a40ea0..5fad76eeec 100755 --- a/indra/newview/llfolderviewmodelinventory.cpp +++ b/indra/newview/llfolderviewmodelinventory.cpp @@ -108,6 +108,29 @@ bool LLFolderViewModelInventory::contentsReady() return !LLInventoryModelBackgroundFetch::instance().folderFetchActive(); } +bool LLFolderViewModelInventory::isFolderComplete(LLFolderViewFolder* folder) +{ + LLFolderViewModelItemInventory* modelp = static_cast(folder->getViewModelItem()); + LLUUID cat_id = modelp->getUUID(); + if (cat_id.isNull()) + { + return false; + } + LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); + if (cat) + { + // don't need to check version - descendents_server == -1 if we have no data + S32 descendents_server = cat->getDescendentCount(); + S32 descendents_actual = cat->getViewerDescendentCount(); + if (descendents_server == descendents_actual + || (descendents_actual > 0 && descendents_server == -1)) // content was loaded in previous session + { + return true; + } + } + return false; +} + void LLFolderViewModelItemInventory::requestSort() { LLFolderViewModelItemCommon::requestSort(); diff --git a/indra/newview/llfolderviewmodelinventory.h b/indra/newview/llfolderviewmodelinventory.h index 8772185ad0..6fe35666f2 100755 --- a/indra/newview/llfolderviewmodelinventory.h +++ b/indra/newview/llfolderviewmodelinventory.h @@ -113,6 +113,7 @@ public: void sort(LLFolderViewFolder* folder); bool contentsReady(); + bool isFolderComplete(LLFolderViewFolder* folder); bool startDrag(std::vector& items); private: -- cgit v1.2.3 From 5849d0e8f220741053ea6e7d071eaa3db66b4236 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 24 Jun 2015 11:47:17 +0300 Subject: MAINT-176 FIXED IM windows don't keep their minimized state after mouselook --- indra/llui/lldockablefloater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp index 3396213f1c..c937d190c6 100755 --- a/indra/llui/lldockablefloater.cpp +++ b/indra/llui/lldockablefloater.cpp @@ -153,7 +153,7 @@ void LLDockableFloater::setVisible(BOOL visible) mDockControl.get()->repositionDockable(); } - if (visible) + if (visible && !isMinimized()) { LLFloater::setFrontmost(getAutoFocus()); } -- cgit v1.2.3 From e94dfafcc7e1e1de270dc62d3db5854500737544 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 25 Jun 2015 14:30:52 +0300 Subject: MAINT-427 FIXED Show default (empty) texture if multiple faces with media are selected. --- indra/newview/llpanelmediasettingsgeneral.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp index 2856ea9db1..d7c43c224c 100755 --- a/indra/newview/llpanelmediasettingsgeneral.cpp +++ b/indra/newview/llpanelmediasettingsgeneral.cpp @@ -319,6 +319,10 @@ void LLPanelMediaSettingsGeneral::initValues( void* userdata, const LLSD& _media // Helper to set media control to media URL as required void LLPanelMediaSettingsGeneral::updateMediaPreview() { + if(LLTrans::getString("Multiple Media") == mHomeURL->getValue().asString()) + { + return; + } if ( mHomeURL->getValue().asString().length() > 0 ) { if(mPreviewMedia->getCurrentNavUrl() != mHomeURL->getValue().asString()) -- cgit v1.2.3 From 4cf53872eb8cc6d5b950da6aec269811cb2de1e3 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 24 Jun 2015 18:29:42 +0300 Subject: MAINT-5026 FIXED 256 prim linksets made of smaller prims frequently link only 254 --- indra/newview/llselectmgr.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index fa7674f772..2a107deb19 100755 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -4920,6 +4920,7 @@ void LLSelectMgr::sendListToRegions(const std::string& message_name, ESendType send_type) { LLSelectNode* node; + LLSelectNode* linkset_root = NULL; LLViewerRegion* last_region; LLViewerRegion* current_region; @@ -4927,6 +4928,8 @@ void LLSelectMgr::sendListToRegions(const std::string& message_name, S32 packets_sent = 0; S32 objects_in_this_packet = 0; + bool link_operation = message_name == "ObjectLink"; + //clear update override data (allow next update through) struct f : public LLSelectedNodeFunctor { @@ -5035,6 +5038,12 @@ void LLSelectMgr::sendListToRegions(const std::string& message_name, && (! gMessageSystem->isSendFull(NULL)) && (objects_in_this_packet < MAX_OBJECTS_PER_PACKET)) { + if (link_operation && linkset_root == NULL) + { + // linksets over 254 will be split into multiple messages, + // but we need to provide same root for all messages or we will get separate linksets + linkset_root = node; + } // add another instance of the body of the data (*pack_body)(node, user_data); ++objects_sent; @@ -5061,6 +5070,22 @@ void LLSelectMgr::sendListToRegions(const std::string& message_name, gMessageSystem->newMessage(message_name.c_str()); (*pack_header)(user_data); + if (linkset_root != NULL) + { + if (current_region != last_region) + { + // root should be in one region with the child, reset it + linkset_root = NULL; + } + else + { + // add root instance into new message + (*pack_body)(linkset_root, user_data); + ++objects_sent; + ++objects_in_this_packet; + } + } + // don't move to the next object, we still need to add the // body data. } -- cgit v1.2.3 From 51aaed86dee3b45fa96fc7b4e8c1b9486c880b3b Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 26 Jun 2015 12:21:12 +0300 Subject: MAINT-5300 FIXED Allow creating and editing new bodyparts. --- indra/newview/llappearancemgr.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 8200f0ba07..4016529092 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1836,6 +1836,10 @@ bool LLAppearanceMgr::canAddWearables(const uuid_vec_t& item_ids) { ++n_clothes; } + else if (item->getType() == LLAssetType::AT_BODYPART) + { + return isAgentAvatarValid(); + } else { LL_WARNS() << "Unexpected wearable type" << LL_ENDL; -- cgit v1.2.3 From b67e96de854e3b8894931390847fc699e5e43c32 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 2 Jul 2015 11:50:52 +0300 Subject: MAINT-302 FIXED Login screen menus flicker when mouse hovers over them --- indra/llui/llmenugl.cpp | 20 ++++++++++++-------- indra/llui/llmenugl.h | 4 ++++ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index fbf2bb5f98..3b8d282445 100755 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -225,7 +225,6 @@ BOOL LLMenuItemGL::handleAcceleratorKey(KEY key, MASK mask) BOOL LLMenuItemGL::handleHover(S32 x, S32 y, MASK mask) { - setHover(TRUE); getWindow()->setCursor(UI_CURSOR_ARROW); return TRUE; } @@ -236,6 +235,18 @@ BOOL LLMenuItemGL::handleRightMouseDown(S32 x, S32 y, MASK mask) return LLUICtrl::handleRightMouseDown(x,y,mask); } +void LLMenuItemGL::onMouseEnter(S32 x, S32 y, MASK mask) +{ + setHover(TRUE); + LLUICtrl::onMouseEnter(x,y,mask); +} + +void LLMenuItemGL::onMouseLeave(S32 x, S32 y, MASK mask) +{ + setHover(FALSE); + LLUICtrl::onMouseLeave(x,y,mask); +} + //virtual BOOL LLMenuItemGL::handleRightMouseUp(S32 x, S32 y, MASK mask) { @@ -533,9 +544,6 @@ void LLMenuItemGL::draw( void ) gl_line_2d(x_begin, (MENU_ITEM_PADDING / 2) + 1, x_end, (MENU_ITEM_PADDING / 2) + 1); } } - - // clear got hover every frame - setHover(FALSE); } BOOL LLMenuItemGL::setLabelArg( const std::string& key, const LLStringExplicit& text ) @@ -1597,10 +1605,6 @@ void LLMenuItemBranchDownGL::draw( void ) gl_line_2d(x_begin, LABEL_BOTTOM_PAD_PIXELS, x_end, LABEL_BOTTOM_PAD_PIXELS); } } - - // reset every frame so that we only show highlight - // when we get hover events on that frame - setHover(FALSE); } diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index ae9b169691..28f9e3b6e9 100755 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -158,6 +158,10 @@ public: virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask ); virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask ); virtual BOOL handleScrollWheel( S32 x, S32 y, S32 clicks ); + + virtual void onMouseEnter(S32 x, S32 y, MASK mask); + virtual void onMouseLeave(S32 x, S32 y, MASK mask); + virtual void draw( void ); BOOL getHover() const { return mGotHover; } -- cgit v1.2.3 From d7702f47e83918282d0180d80785649987986fd5 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 2 Jul 2015 12:51:45 +0300 Subject: MAINT-5345 FIXED Unable to end IM voice call using context menu. --- indra/newview/llconversationmodel.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index 6e32ce60ec..328a638f2f 100755 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -136,7 +136,24 @@ void LLConversationItem::buildParticipantMenuOptions(menuentry_vec_t& items, U32 items.push_back(std::string("im")); items.push_back(std::string("offer_teleport")); items.push_back(std::string("request_teleport")); - items.push_back(std::string("voice_call")); + + if (getType() != CONV_SESSION_1_ON_1) + { + items.push_back(std::string("voice_call")); + } + else + { + LLVoiceChannel* voice_channel = LLIMModel::getInstance() ? LLIMModel::getInstance()->getVoiceChannel(this->getUUID()) : NULL; + if(voice_channel != LLVoiceChannel::getCurrentVoiceChannel()) + { + items.push_back(std::string("voice_call")); + } + else + { + items.push_back(std::string("disconnect_from_voice")); + } + } + items.push_back(std::string("chat_history")); items.push_back(std::string("separator_chat_history")); items.push_back(std::string("add_friend")); -- cgit v1.2.3 From 2cde11b7baba1cb373af7c669339f85dfefb8b76 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 1 Jul 2015 20:07:56 +0300 Subject: MAINT-2864 FIXED Viewer crashes when clicking "Ok" on "Delete Selected Item" modal from a non existant object. --- indra/newview/llinventoryfunctions.cpp | 27 ++++++++++++++------------- indra/newview/llinventoryfunctions.h | 2 -- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 4075c329b9..58cab8a058 100755 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -674,6 +674,19 @@ void copy_folder_to_outbox(LLInventoryCategory* inv_cat, const LLUUID& dest_fold open_outbox(); } +static void items_removal_confirmation(const LLSD& notification, const LLSD& response, LLHandle root) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option == 0 && !root.isDead() && !root.get()->isDead()) + { + LLFolderView* folder_root = root.get(); + //Need to remove item from DND before item is removed from root folder view + //because once removed from root folder view the item is no longer a selected item + LLInventoryAction::removeItemFromDND(folder_root); + folder_root->removeSelectedItems(); + } +} + ///---------------------------------------------------------------------------- /// LLInventoryCollectFunctor implementations ///---------------------------------------------------------------------------- @@ -1072,7 +1085,7 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root { LLSD args; args["QUESTION"] = LLTrans::getString(root->getSelectedCount() > 1 ? "DeleteItems" : "DeleteItem"); - LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&LLInventoryAction::onItemsRemovalConfirmation, _1, _2, root)); + LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&items_removal_confirmation, _1, _2, root->getHandle())); return; } if (("copy" == action) || ("cut" == action)) @@ -1178,15 +1191,3 @@ void LLInventoryAction::removeItemFromDND(LLFolderView* root) } } } - -void LLInventoryAction::onItemsRemovalConfirmation( const LLSD& notification, const LLSD& response, LLFolderView* root ) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if (option == 0) - { - //Need to remove item from DND before item is removed from root folder view - //because once removed from root folder view the item is no longer a selected item - removeItemFromDND(root); - root->removeSelectedItems(); - } -} diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index 6b3861aa79..92780eb10f 100755 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -438,8 +438,6 @@ public: struct LLInventoryAction { static void doToSelected(class LLInventoryModel* model, class LLFolderView* root, const std::string& action); - - static void onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, LLFolderView* root); static void removeItemFromDND(LLFolderView* root); }; -- cgit v1.2.3 From b5bedce5c287aba7fa6166c385da15877fcb0071 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 2 Jul 2015 15:44:08 +0300 Subject: MAINT-23 reverted --- indra/newview/lllocationinputctrl.cpp | 5 +---- indra/newview/llpaneltopinfobar.cpp | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index cf04c5f7a5..8d21fda8f9 100755 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -862,14 +862,11 @@ void LLLocationInputCtrl::refreshParcelIcons() bool see_avs = current_parcel->getSeeAVs(); bool pathfinding_dynamic_enabled = agent_region->dynamicPathfindingEnabled(); - bool is_parcel_owner = (gAgent.getID() == current_parcel->getOwnerID()); - bool allow_group_modify = (gAgent.isInGroup(current_parcel->getGroupID()) && current_parcel->getAllowGroupModify()); - // Most icons are "block this ability" mParcelIcon[VOICE_ICON]->setVisible( !allow_voice ); mParcelIcon[FLY_ICON]->setVisible( !allow_fly ); mParcelIcon[PUSH_ICON]->setVisible( !allow_push ); - mParcelIcon[BUILD_ICON]->setVisible( !allow_build && !is_parcel_owner && !allow_group_modify ); + mParcelIcon[BUILD_ICON]->setVisible( !allow_build ); mParcelIcon[SCRIPTS_ICON]->setVisible( !allow_scripts ); mParcelIcon[DAMAGE_ICON]->setVisible( allow_damage ); mParcelIcon[PATHFINDING_DIRTY_ICON]->setVisible(mIsNavMeshDirty); diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp index ac9a31ce4e..109013498e 100755 --- a/indra/newview/llpaneltopinfobar.cpp +++ b/indra/newview/llpaneltopinfobar.cpp @@ -313,14 +313,11 @@ void LLPanelTopInfoBar::updateParcelIcons() bool allow_damage = vpm->allowAgentDamage(agent_region, current_parcel); bool see_avs = current_parcel->getSeeAVs(); - bool is_parcel_owner = (gAgent.getID() == current_parcel->getOwnerID()); - bool allow_group_modify = (gAgent.isInGroup(current_parcel->getGroupID()) && current_parcel->getAllowGroupModify()); - // Most icons are "block this ability" mParcelIcon[VOICE_ICON]->setVisible( !allow_voice ); mParcelIcon[FLY_ICON]->setVisible( !allow_fly ); mParcelIcon[PUSH_ICON]->setVisible( !allow_push ); - mParcelIcon[BUILD_ICON]->setVisible( !allow_build && !is_parcel_owner && !allow_group_modify ); + mParcelIcon[BUILD_ICON]->setVisible( !allow_build ); mParcelIcon[SCRIPTS_ICON]->setVisible( !allow_scripts ); mParcelIcon[DAMAGE_ICON]->setVisible( allow_damage ); mDamageText->setVisible(allow_damage); -- cgit v1.2.3 From 1c08b2a2e987f43f97a51de652ee6c2a574291e1 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 6 Jul 2015 12:12:27 +0300 Subject: MAINT-1968 FIXED Reset camera when toggling flying same as all other methods. --- indra/newview/llmoveview.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index fe562baf96..70035bcc74 100755 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -303,7 +303,15 @@ void LLFloaterMove::onFlyButtonClick() void LLFloaterMove::setMovementMode(const EMovementMode mode) { mCurrentMode = mode; - gAgent.setFlying(MM_FLY == mode); + + if(MM_FLY == mode) + { + LLAgent::toggleFlying(); + } + else + { + gAgent.setFlying(FALSE); + } // attempts to set avatar flying can not set it real flying in some cases. // For ex. when avatar fell down & is standing up. -- cgit v1.2.3 From bd21c65fb9e08e6dc726f37e3f00e063b3156fab Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 7 Jul 2015 12:42:08 +0300 Subject: MAINT-4763 FIXED Remove NoValidTimestamp from viewer --- indra/newview/skins/default/xui/da/notifications.xml | 3 --- indra/newview/skins/default/xui/de/notifications.xml | 3 --- indra/newview/skins/default/xui/en/notifications.xml | 9 --------- indra/newview/skins/default/xui/es/notifications.xml | 3 --- indra/newview/skins/default/xui/fr/notifications.xml | 3 --- indra/newview/skins/default/xui/it/notifications.xml | 3 --- indra/newview/skins/default/xui/pt/notifications.xml | 3 --- indra/newview/skins/default/xui/ru/notifications.xml | 3 --- indra/newview/skins/default/xui/tr/notifications.xml | 3 --- indra/newview/skins/default/xui/zh/notifications.xml | 3 --- 10 files changed, 36 deletions(-) diff --git a/indra/newview/skins/default/xui/da/notifications.xml b/indra/newview/skins/default/xui/da/notifications.xml index 33b876bdb9..aad3b9d062 100755 --- a/indra/newview/skins/default/xui/da/notifications.xml +++ b/indra/newview/skins/default/xui/da/notifications.xml @@ -1311,9 +1311,6 @@ Prøv igen om lidt. Ingen gyldig kode for kredsløb. - - Ikke et gyldigt klokkeslæt. - Kunne ikke skabe fast forbindelse. diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index 09cba36e25..2abbe3edd7 100755 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -2709,9 +2709,6 @@ Versuchen Sie es in einigen Minuten erneut. Kein gültiger Verbindungscode. - - Kein gültiger Zeitstempel. - Verbindung kann nicht hergestellt werden. diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 227d1dd273..1225601e7b 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -6820,15 +6820,6 @@ No valid session id. No valid circuit code. - - fail -No valid timestamp. - - Circuito de código inválido. - - Fecha inválida. - No se puede crear la conexión. diff --git a/indra/newview/skins/default/xui/fr/notifications.xml b/indra/newview/skins/default/xui/fr/notifications.xml index 28689a93d6..a8e31951fb 100755 --- a/indra/newview/skins/default/xui/fr/notifications.xml +++ b/indra/newview/skins/default/xui/fr/notifications.xml @@ -2695,9 +2695,6 @@ Veuillez réessayer dans quelques minutes. Aucun code de circuit valide. - - Timestamp non valide. - Impossible de créer la connexion en attente. diff --git a/indra/newview/skins/default/xui/it/notifications.xml b/indra/newview/skins/default/xui/it/notifications.xml index fe53dd18dd..c9673ca70f 100755 --- a/indra/newview/skins/default/xui/it/notifications.xml +++ b/indra/newview/skins/default/xui/it/notifications.xml @@ -2700,9 +2700,6 @@ Riprova tra qualche istante. Nessun codice circuito valido. - - Nessuna data/timestamp valido. - Impossibile creare la connessione in sospeso. diff --git a/indra/newview/skins/default/xui/pt/notifications.xml b/indra/newview/skins/default/xui/pt/notifications.xml index a01c9c757b..77dc377bbe 100755 --- a/indra/newview/skins/default/xui/pt/notifications.xml +++ b/indra/newview/skins/default/xui/pt/notifications.xml @@ -2684,9 +2684,6 @@ Por favor, tente novamente em alguns instantes. Código de circuito inválido. - - Hora inválida. - Impossível criar a conexão pendente. diff --git a/indra/newview/skins/default/xui/ru/notifications.xml b/indra/newview/skins/default/xui/ru/notifications.xml index 206be2e2df..0f6bbff58e 100755 --- a/indra/newview/skins/default/xui/ru/notifications.xml +++ b/indra/newview/skins/default/xui/ru/notifications.xml @@ -2695,9 +2695,6 @@ http://secondlife.com/download. Нет подходящего кода канала. - - Нет подходящей метки времени. - Невозможно создать отложенное соединение. diff --git a/indra/newview/skins/default/xui/tr/notifications.xml b/indra/newview/skins/default/xui/tr/notifications.xml index b854d3964b..750261b842 100755 --- a/indra/newview/skins/default/xui/tr/notifications.xml +++ b/indra/newview/skins/default/xui/tr/notifications.xml @@ -2695,9 +2695,6 @@ Lütfen biraz sonra tekrar deneyin. Geçerli bir devre kodu yok. - - Geçerli bir zaman damgası yok. - Beklemedeki bağlantı oluşturulamıyor. diff --git a/indra/newview/skins/default/xui/zh/notifications.xml b/indra/newview/skins/default/xui/zh/notifications.xml index 5b520dd745..4364de8c3a 100755 --- a/indra/newview/skins/default/xui/zh/notifications.xml +++ b/indra/newview/skins/default/xui/zh/notifications.xml @@ -2685,9 +2685,6 @@ SHA1 指紋:[MD5_DIGEST] 沒有有效的線路碼。 - - 沒有有效的時間戳記。 - 無法建立待通的連線。 -- cgit v1.2.3 From a6e90d25ce1538bd0b16827716fccbb08912cf01 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 7 Jul 2015 14:39:10 +0300 Subject: MAINT-4763 FIXED Remove NoValidTimestamp from viewer --- indra/newview/skins/default/xui/ja/notifications.xml | 3 --- indra/newview/skins/default/xui/pl/notifications.xml | 3 --- 2 files changed, 6 deletions(-) diff --git a/indra/newview/skins/default/xui/ja/notifications.xml b/indra/newview/skins/default/xui/ja/notifications.xml index fba89dc296..7c9663838a 100755 --- a/indra/newview/skins/default/xui/ja/notifications.xml +++ b/indra/newview/skins/default/xui/ja/notifications.xml @@ -2743,9 +2743,6 @@ Web ページにリンクすると、他人がこの場所に簡単にアクセ 回路コードが無効です。 - - タイムスタンプが無効です。 - 接続を生成できません。 diff --git a/indra/newview/skins/default/xui/pl/notifications.xml b/indra/newview/skins/default/xui/pl/notifications.xml index f255b1b8ea..14f99ffa4e 100755 --- a/indra/newview/skins/default/xui/pl/notifications.xml +++ b/indra/newview/skins/default/xui/pl/notifications.xml @@ -2361,9 +2361,6 @@ Spróbuj ponowanie za kilka minut. Nieważny obwód kodowania. - - Niewłaściwy czas zapisu. - Brak możliwości wykonania połączenia. -- cgit v1.2.3 From 7ae4837b520a79960186ab074c9a73913f15ea65 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 8 Jul 2015 14:07:47 +0300 Subject: MAINT-1412 FIXED Don't update creator/owner name if it stays the same. --- indra/newview/llsidepaneltaskinfo.cpp | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index 17ecfab4fb..2548d730f0 100755 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -370,18 +370,25 @@ void LLSidepanelTaskInfo::refresh() // Update creator text field getChildView("Creator:")->setEnabled(TRUE); + std::string creator_name; - LLSelectMgr::getInstance()->selectGetCreator(mCreatorID, creator_name); + LLUUID creator_id; + LLSelectMgr::getInstance()->selectGetCreator(creator_id, creator_name); - getChild("Creator Name")->setValue(creator_name); - getChildView("Creator Name")->setEnabled(TRUE); + if(creator_id != mCreatorID ) + { + mDACreatorName->setValue(creator_name); + mCreatorID = creator_id; + } + mDACreatorName->setEnabled(TRUE); // Update owner text field getChildView("Owner:")->setEnabled(TRUE); std::string owner_name; - const BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_name); - if (mOwnerID.isNull()) + LLUUID owner_id; + const BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name); + if (owner_id.isNull()) { if (LLSelectMgr::getInstance()->selectIsGroupOwned()) { @@ -402,7 +409,12 @@ void LLSidepanelTaskInfo::refresh() } } } - getChild("Owner Name")->setValue(owner_name); + + if(owner_id.isNull() || (owner_id != mOwnerID)) + { + mDAOwnerName->setValue(owner_name); + mOwnerID = owner_id; + } getChildView("Owner Name")->setEnabled(TRUE); // update group text field -- cgit v1.2.3 From f153aa3daf2e70b6da8c113b55afff10af1f5fae Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Wed, 8 Jul 2015 06:15:27 +0300 Subject: MAINT-5371 FIXED Undesired space added to SL and LL domains sent in chat --- indra/llui/llurlregistry.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index 2085505947..5ad05a1c86 100755 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -218,6 +218,10 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL // did we find a match? if so, return its details in the match object if (match_entry) { + // Skip if link is an email. See MAINT-5371. + if (match_start > 0 && text.substr(match_start - 1, 1) == "@") + return false; + // fill in the LLUrlMatch object and return it std::string url = text.substr(match_start, match_end - match_start + 1); -- cgit v1.2.3 From 9790ec0c753b54d5ab0c7e6c54139888f49107e3 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 7 Jul 2015 18:51:19 +0300 Subject: MAINT-5174 Add Check for Updates feature to Help menu --- indra/newview/llfloaterabout.cpp | 93 +++++++++++++++++++++- indra/newview/llfloaterabout.h | 3 + indra/newview/llviewermenu.cpp | 18 +++++ .../newview/skins/default/xui/en/floater_about.xml | 8 ++ indra/newview/skins/default/xui/en/menu_login.xml | 6 ++ indra/newview/skins/default/xui/en/menu_viewer.xml | 8 +- .../newview/skins/default/xui/en/notifications.xml | 47 +++++++++++ .../viewer_components/updater/llupdaterservice.cpp | 18 +++++ indra/viewer_components/updater/llupdaterservice.h | 1 + 9 files changed, 200 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index e71daa6067..d88a869d60 100755 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -34,10 +34,12 @@ // Viewer includes #include "llagent.h" #include "llagentui.h" -#include "llappviewer.h" +#include "llappviewer.h" +#include "llnotificationsutil.h" #include "llslurl.h" #include "llvoiceclient.h" #include "lluictrlfactory.h" +#include "llupdaterservice.h" #include "llviewertexteditor.h" #include "llviewercontrol.h" #include "llviewerstats.h" @@ -99,9 +101,23 @@ public: /// separated so that we can programmatically access the same info. static LLSD getInfo(); void onClickCopyToClipboard(); + void onClickUpdateCheck(); + + // checks state of updater service and starts a check outside of schedule. + // subscribes callback for closest state update + static void setUpdateListener(); private: void setSupportText(const std::string& server_release_notes_url); + + // notifications for user requested checks + static void LLFloaterAbout::showCheckUpdateNotification(S32 state); + + // callback method for manual checks + static bool LLFloaterAbout::callbackCheckUpdate(LLSD const & event); + + // listener name for update checks + static const std::string LLFloaterAbout::sCheckUpdateListenerName; }; @@ -132,6 +148,9 @@ BOOL LLFloaterAbout::postBuild() getChild("copy_btn")->setCommitCallback( boost::bind(&LLFloaterAbout::onClickCopyToClipboard, this)); + getChild("update_btn")->setCommitCallback( + boost::bind(&LLFloaterAbout::onClickUpdateCheck, this)); + static const LLUIColor about_color = LLUIColorTable::instance().getColor("TextFgReadOnlyColor"); if (gAgent.getRegion()) @@ -235,6 +254,11 @@ void LLFloaterAbout::onClickCopyToClipboard() support_widget->deselect(); } +void LLFloaterAbout::onClickUpdateCheck() +{ + setUpdateListener(); +} + void LLFloaterAbout::setSupportText(const std::string& server_release_notes_url) { #if LL_WINDOWS @@ -255,6 +279,68 @@ void LLFloaterAbout::setSupportText(const std::string& server_release_notes_url) FALSE, LLStyle::Params() .color(about_color)); } +///---------------------------------------------------------------------------- +/// Floater About Update-check related functions +///---------------------------------------------------------------------------- + +const std::string LLFloaterAbout::sCheckUpdateListenerName = "LLUpdateNotificationListener"; + +void LLFloaterAbout::showCheckUpdateNotification(S32 state) +{ + switch (state) + { + case LLUpdaterService::UP_TO_DATE: + LLNotificationsUtil::add("UpdateViewerUpToDate"); + break; + case LLUpdaterService::DOWNLOADING: + case LLUpdaterService::INSTALLING: + LLNotificationsUtil::add("UpdateDownloadInProgress"); + break; + case LLUpdaterService::TERMINAL: + // download complete, user triggered check after download pop-up appeared + LLNotificationsUtil::add("UpdateDownloadComplete"); + break; + default: + LLNotificationsUtil::add("UpdateCheckError"); + break; + } +} + +bool LLFloaterAbout::callbackCheckUpdate(LLSD const & event) +{ + if (!event.has("payload")) + { + return false; + } + + LLSD payload = event["payload"]; + if (payload.has("type") && payload["type"].asInteger() == LLUpdaterService::STATE_CHANGE) + { + LLEventPumps::instance().obtain("mainlooprepeater").stopListening(sCheckUpdateListenerName); + showCheckUpdateNotification(payload["state"].asInteger()); + } + return false; +} + +void LLFloaterAbout::setUpdateListener() +{ + LLUpdaterService update_service; + S32 service_state = update_service.getState(); + // Note: Do not set state listener before forceCheck() since it set's new state + if (update_service.forceCheck() || service_state == LLUpdaterService::CHECKING_FOR_UPDATE) + { + LLEventPump& mainloop(LLEventPumps::instance().obtain("mainlooprepeater")); + if (mainloop.getListener(sCheckUpdateListenerName) == LLBoundListener()) // dummy listener + { + mainloop.listen(sCheckUpdateListenerName, boost::bind(&callbackCheckUpdate, _1)); + } + } + else + { + showCheckUpdateNotification(service_state); + } +} + ///---------------------------------------------------------------------------- /// LLFloaterAboutUtil ///---------------------------------------------------------------------------- @@ -265,6 +351,11 @@ void LLFloaterAboutUtil::registerFloater() } +void LLFloaterAboutUtil::checkUpdatesAndNotify() +{ + LLFloaterAbout::setUpdateListener(); +} + ///---------------------------------------------------------------------------- /// Class LLServerReleaseNotesURLFetcher implementation ///---------------------------------------------------------------------------- diff --git a/indra/newview/llfloaterabout.h b/indra/newview/llfloaterabout.h index 8fc1aa4f29..be34b631cc 100755 --- a/indra/newview/llfloaterabout.h +++ b/indra/newview/llfloaterabout.h @@ -30,6 +30,9 @@ namespace LLFloaterAboutUtil { void registerFloater(); + + // Support for user initialized update/state checks + void checkUpdatesAndNotify(); } #endif // LL_LLFLOATERABOUT_H diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 6d7a8008ba..5c55683d84 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -57,6 +57,7 @@ #include "llfacebookconnect.h" #include "llfilepicker.h" #include "llfirstuse.h" +#include "llfloaterabout.h" #include "llfloaterbuy.h" #include "llfloaterbuycontents.h" #include "llbuycurrencyhtml.h" @@ -2077,6 +2078,22 @@ class LLAdvancedCheckShowObjectUpdates : public view_listener_t +/////////////////////// +// CHECK FOR UPDATES // +/////////////////////// + + + +class LLAdvancedCheckViewerUpdates : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLFloaterAboutUtil::checkUpdatesAndNotify(); + return true; + } +}; + + //////////////////// // COMPRESS IMAGE // //////////////////// @@ -8857,6 +8874,7 @@ void initialize_menus() // Advanced (toplevel) view_listener_t::addMenu(new LLAdvancedToggleShowObjectUpdates(), "Advanced.ToggleShowObjectUpdates"); view_listener_t::addMenu(new LLAdvancedCheckShowObjectUpdates(), "Advanced.CheckShowObjectUpdates"); + view_listener_t::addMenu(new LLAdvancedCheckViewerUpdates(), "Advanced.CheckViewerUpdates"); view_listener_t::addMenu(new LLAdvancedCompressImage(), "Advanced.CompressImage"); view_listener_t::addMenu(new LLAdvancedShowDebugSettings(), "Advanced.ShowDebugSettings"); view_listener_t::addMenu(new LLAdvancedEnableViewAdminOptions(), "Advanced.EnableViewAdminOptions"); diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index 60f36770bb..ec87b3684e 100755 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -43,6 +43,14 @@ top_pad="5" height="25" width="180" /> + - + @@ -1439,6 +1439,12 @@ function="Floater.Show" parameter="sl_about" /> + + + + + +An update is available! +It's downloading in the background and we will prompt you to restart your viewer to finish installing it as soon as it's ready. + confirm + + + + +An update was downloaded. It will be installed during restart. + confirm + + + + +An error occured while checking for update. +Please try again later. + confirm + + + + +Your viewer is up to date! +If you can't wait to try out the latest features and fixes, check out the Alternate Viewers page. http://wiki.secondlife.com/wiki/Linden_Lab_Official:Alternate_Viewers. + confirm + + stopChecking(); } +bool LLUpdaterService::forceCheck() +{ + return mImpl->forceCheck(); +} + bool LLUpdaterService::isChecking() { return mImpl->isChecking(); diff --git a/indra/viewer_components/updater/llupdaterservice.h b/indra/viewer_components/updater/llupdaterservice.h index 0ddf24935b..95bbe1695c 100755 --- a/indra/viewer_components/updater/llupdaterservice.h +++ b/indra/viewer_components/updater/llupdaterservice.h @@ -84,6 +84,7 @@ public: void startChecking(bool install_if_ready = false); void stopChecking(); + bool forceCheck(); bool isChecking(); eUpdaterState getState(); -- cgit v1.2.3 From f9929bb62eb79f80acd49c74f83edee0abc1ab66 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 10 Jul 2015 15:55:25 +0300 Subject: MAINT-5363 FIXED Selecting an inventory item plus an inventory link displays delete menu twice but both delete options are greyed out. --- indra/newview/llinventorybridge.cpp | 10 +--------- indra/newview/skins/default/xui/en/menu_inventory.xml | 8 -------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index ddf72bc8cf..31bca6b9a9 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -863,15 +863,7 @@ void LLInvFVBridge::addDeleteContextMenuOptions(menuentry_vec_t &items, return; } - // "Remove link" and "Delete" are the same operation. - if (obj && obj->getIsLinkType() && !get_is_item_worn(mUUID)) - { - items.push_back(std::string("Remove Link")); - } - else - { - items.push_back(std::string("Delete")); - } + items.push_back(std::string("Delete")); if (!isItemRemovable()) { diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index 7099db63ab..c0dddfc625 100755 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -487,14 +487,6 @@ - - - Date: Mon, 13 Jul 2015 16:58:41 +0300 Subject: build fix for linux --- indra/newview/llfloaterabout.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index d88a869d60..c5d637d1fc 100755 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -111,13 +111,13 @@ private: void setSupportText(const std::string& server_release_notes_url); // notifications for user requested checks - static void LLFloaterAbout::showCheckUpdateNotification(S32 state); + static void showCheckUpdateNotification(S32 state); // callback method for manual checks - static bool LLFloaterAbout::callbackCheckUpdate(LLSD const & event); + static bool callbackCheckUpdate(LLSD const & event); // listener name for update checks - static const std::string LLFloaterAbout::sCheckUpdateListenerName; + static const std::string sCheckUpdateListenerName; }; -- cgit v1.2.3 From f2c82b096b994556cdcb7e31276e278d0327d392 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 13 Jul 2015 17:02:56 +0300 Subject: MAINT-5347 FIXED Set Landmark title field as the name of the region with coordinates, if the name of parcel is blank. --- indra/newview/llpanellandmarkinfo.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index d4894d4a42..06bb886ae8 100755 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -147,6 +147,7 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type) } else { + LLAgentUI::buildLocationString(desc, LLAgentUI::LOCATION_FORMAT_NORMAL, agent_pos); region_name = desc; } -- cgit v1.2.3 From 4a3d2eff64453915648979ae493f9bbaa1c0fcf8 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Mon, 13 Jul 2015 17:59:50 +0300 Subject: MAINT-5015 (Nearby objects often load at wrong LOD at login or after intra-region teleports) The idea and reason in this fix is same as for a MAINT-4297, MAINT-4449, BUG-7239 i.e. it's a just a little another case. --- indra/newview/llvovolume.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index cae67907dd..4b0e4514a0 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1639,7 +1639,7 @@ bool LLVOVolume::lodOrSculptChanged(LLDrawable *drawable, BOOL &compiled) { LL_RECORD_BLOCK_TIME(FTM_GEN_VOLUME); - LLVolumeParams volume_params = getVolume()->getParams(); + const LLVolumeParams &volume_params = getVolume()->getParams(); setVolume(volume_params, 0); } @@ -1724,8 +1724,6 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) return TRUE; // No update to complete } - boost::function fn_lod_or_sculpt_changed = boost::bind(&LLVOVolume::lodOrSculptChanged, this, drawable, boost::ref(compiled)); - if (mVolumeChanged || mFaceMappingChanged) { dirtySpatialGroup(drawable->isState(LLDrawable::IN_REBUILD_Q1)); @@ -1734,13 +1732,13 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) if (mVolumeChanged) { - was_regen_faces = fn_lod_or_sculpt_changed(); + was_regen_faces = lodOrSculptChanged(drawable, compiled); drawable->setState(LLDrawable::REBUILD_VOLUME); } - else if (mSculptChanged) + else if (mSculptChanged || mLODChanged) { compiled = TRUE; - was_regen_faces = fn_lod_or_sculpt_changed(); + was_regen_faces = lodOrSculptChanged(drawable, compiled); } if (!was_regen_faces) { @@ -1754,7 +1752,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) { dirtySpatialGroup(drawable->isState(LLDrawable::IN_REBUILD_Q1)); compiled = TRUE; - fn_lod_or_sculpt_changed(); + lodOrSculptChanged(drawable, compiled); genBBoxes(FALSE); } // it has its own drawable (it's moved) or it has changed UVs or it has changed xforms from global<->local -- cgit v1.2.3 From 3e39a29683864a833cf3c5590597a0c517daa23b Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 14 Jul 2015 12:07:14 +0300 Subject: MAINT-5390 FIXED physical objects that roll off region go to trash without notification --- indra/newview/llviewermessage.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index b3dd7207ef..62314a0f4e 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2861,6 +2861,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) case IM_FROM_TASK: { + if (is_do_not_disturb && !is_owned_by_me) { return; @@ -2944,17 +2945,13 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) payload["from_id"] = from_id; payload["slurl"] = location; payload["name"] = name; - std::string session_name; + if (from_group) { payload["group_owned"] = "true"; } - LLNotification::Params params("ServerObjectMessage"); - params.substitutions = substitutions; - params.payload = payload; - - LLPostponedNotification::add(params, from_id, from_group); + LLNotificationsUtil::add("ServerObjectMessage", substitutions, payload); } break; -- cgit v1.2.3 From ca6a9d16354a55cc40f2ab22d7b8d13c66bfac08 Mon Sep 17 00:00:00 2001 From: pavelkproductengine Date: Mon, 13 Jul 2015 21:21:45 +0300 Subject: MAINT-5389 FIXED Windows viewer starts automatically during silent install --- indra/newview/installers/windows/installer_template.nsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 95cdf90e99..b8677fd9e4 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -165,7 +165,9 @@ lbl_configure_default_lang: StrCpy $LANGUAGE $0 # For silent installs, no language prompt, use default - IfSilent lbl_return + IfSilent 0 +3 + StrCpy $SKIP_AUTORUN "true" + Goto lbl_return StrCmp $SKIP_DIALOGS "true" lbl_return lbl_build_menu: -- cgit v1.2.3 From 078612e292fa8b66a8b7a68b7e1fe9b5049c3deb Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Tue, 14 Jul 2015 04:39:20 +0300 Subject: MAINT-5019 FIXED Additional cases --- indra/llui/llurlentry.cpp | 40 +++++++++++++++++++--- indra/llui/llurlentry.h | 11 ++++++ indra/llui/llurlregistry.cpp | 13 ++++--- indra/llwindow/llwindow.cpp | 4 +-- .../skins/default/xui/en/menu_url_email.xml | 21 ++++++++++++ indra/newview/skins/default/xui/en/strings.xml | 1 + 6 files changed, 76 insertions(+), 14 deletions(-) create mode 100644 indra/newview/skins/default/xui/en/menu_url_email.xml diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 874046a4a8..95f931de0a 100755 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -293,11 +293,7 @@ std::string LLUrlEntryHTTPLabel::getUrl(const std::string &string) const LLUrlEntryHTTPNoProtocol::LLUrlEntryHTTPNoProtocol() : LLUrlEntryBase() { - mPattern = boost::regex("(" - "\\bwww\\.\\S+\\.\\S+" // i.e. www.FOO.BAR - "|" // or - "(?]+\\.(?:com|net|edu|org)([/:][^[:space:]<]*)?\\b" // i.e. FOO.net - ")", + mPattern = boost::regex("\\bwww\\.\\S+\\.\\S+", // i.e. www.FOO.BAR boost::regex::perl|boost::regex::icase); mMenuName = "menu_url_http.xml"; mTooltip = LLTrans::getString("TooltipHttpUrl"); @@ -1401,6 +1397,40 @@ std::string LLUrlEntryIcon::getIcon(const std::string &url) return mIcon; } +// +// LLUrlEntryEmail Describes a generic mailto: Urls +// +LLUrlEntryEmail::LLUrlEntryEmail() + : LLUrlEntryBase() +{ + mPattern = boost::regex("(mailto:)?[\\w\\.\\-]+@[\\w\\.\\-]+\\.[a-z]{2,6}", + boost::regex::perl | boost::regex::icase); + mMenuName = "menu_url_email.xml"; + mTooltip = LLTrans::getString("TooltipEmail"); +} + +std::string LLUrlEntryEmail::getLabel(const std::string &url, const LLUrlLabelCallback &cb) +{ + int pos = url.find("mailto:"); + + if (pos == std::string::npos) + { + return escapeUrl(url); + } + + std::string ret = escapeUrl(url.substr(pos + 7, url.length() - pos + 8)); + return ret; +} + +std::string LLUrlEntryEmail::getUrl(const std::string &string) const +{ + if (string.find("mailto:") == std::string::npos) + { + return "mailto:" + escapeUrl(string); + } + return escapeUrl(string); +} + LLUrlEntryExperienceProfile::LLUrlEntryExperienceProfile() { mPattern = boost::regex(APP_HEADER_REGEX "/experience/[\\da-f-]+/\\w+\\S*", diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h index dd1f257a3d..4d5e77c3bd 100755 --- a/indra/llui/llurlentry.h +++ b/indra/llui/llurlentry.h @@ -506,5 +506,16 @@ public: /*virtual*/ std::string getIcon(const std::string &url); }; +/// +/// LLUrlEntryEmail Describes a generic mailto: Urls +/// +class LLUrlEntryEmail : public LLUrlEntryBase +{ +public: + LLUrlEntryEmail(); + /*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb); + /*virtual*/ std::string getUrl(const std::string &string) const; +}; + #endif diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index 5ad05a1c86..fcdb5b19d4 100755 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -76,9 +76,10 @@ LLUrlRegistry::LLUrlRegistry() registerUrl(new LLUrlEntrySL()); mUrlEntrySLLabel = new LLUrlEntrySLLabel(); registerUrl(mUrlEntrySLLabel); - // most common pattern is a URL without any protocol, - // e.g., "secondlife.com" + // most common pattern is a URL without any protocol starting with "www", + // e.g., "www.secondlife.com" registerUrl(new LLUrlEntryHTTPNoProtocol()); + registerUrl(new LLUrlEntryEmail()); } LLUrlRegistry::~LLUrlRegistry() @@ -155,11 +156,9 @@ static bool stringHasUrl(const std::string &text) return (text.find("://") != std::string::npos || text.find("www.") != std::string::npos || text.find(".com") != std::string::npos || - text.find(".net") != std::string::npos || - text.find(".edu") != std::string::npos || - text.find(".org") != std::string::npos || text.find("") != std::string::npos || - text.find(" 0 && text.substr(match_start - 1, 1) == "@") return false; diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp index 5720660034..1b24250618 100755 --- a/indra/llwindow/llwindow.cpp +++ b/indra/llwindow/llwindow.cpp @@ -49,8 +49,8 @@ LLSplashScreen *gSplashScreenp = NULL; BOOL gDebugClicks = FALSE; BOOL gDebugWindowProc = FALSE; -const S32 gURLProtocolWhitelistCount = 4; -const std::string gURLProtocolWhitelist[] = { "secondlife:", "http:", "https:", "data:" }; +const S32 gURLProtocolWhitelistCount = 5; +const std::string gURLProtocolWhitelist[] = { "secondlife:", "http:", "https:", "data:", "mailto:" }; // CP: added a handler list - this is what's used to open the protocol and is based on registry entry // only meaningful difference currently is that file: protocols are opened using http: diff --git a/indra/newview/skins/default/xui/en/menu_url_email.xml b/indra/newview/skins/default/xui/en/menu_url_email.xml new file mode 100644 index 0000000000..6467fe5c90 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_url_email.xml @@ -0,0 +1,21 @@ + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 5e58360158..8c58ebc359 100755 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -271,6 +271,7 @@ Please try logging in again in a minute. Click to view this location on a map Click to run the secondlife:// command + Click to compose an email Teleport to -- cgit v1.2.3 From d43cef4ed5a012593ff31c4ef9c0356edbea5339 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 14 Jul 2015 16:29:36 +0300 Subject: MAINT-5364 FIXED Object with invalid sculpt topology type cannot be seen or selected --- indra/llmath/llvolume.cpp | 29 ++++++++++++++++++++++++++++- indra/llmath/llvolume.h | 13 ++++++++----- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 41ee3941ac..82081ca853 100755 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -3178,6 +3178,16 @@ BOOL LLVolume::isFlat(S32 face) } +LLVolumeParams::LLVolumeParams( LLProfileParams &profile, + LLPathParams &path, + LLUUID sculpt_id, + U8 sculpt_type) : +mProfileParams(profile), +mPathParams(path) +{ + setSculptID(sculpt_id, sculpt_type); +} + bool LLVolumeParams::isSculpt() const { return mSculptID.notNull(); @@ -3494,7 +3504,24 @@ bool LLVolumeParams::setSkew(const F32 skew_value) bool LLVolumeParams::setSculptID(const LLUUID sculpt_id, U8 sculpt_type) { mSculptID = sculpt_id; - mSculptType = sculpt_type; + // Check sculpt type value, it consist of type and flags + U8 type = sculpt_type & LL_SCULPT_TYPE_MASK; + U8 flags = sculpt_type & LL_SCULPT_FLAG_MASK; + if (sculpt_type != (type | flags) || type > LL_SCULPT_TYPE_MAX) + { + if (sculpt_id != LLUUID::null) + { + mSculptType = LL_SCULPT_TYPE_MESH; + } + else + { + mSculptType = LL_SCULPT_TYPE_SPHERE; + } + } + else + { + mSculptType = sculpt_type; + } return true; } diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h index c8476f6897..06688cacc9 100755 --- a/indra/llmath/llvolume.h +++ b/indra/llmath/llvolume.h @@ -190,8 +190,12 @@ const U8 LL_SCULPT_TYPE_MESH = 5; const U8 LL_SCULPT_TYPE_MASK = LL_SCULPT_TYPE_SPHERE | LL_SCULPT_TYPE_TORUS | LL_SCULPT_TYPE_PLANE | LL_SCULPT_TYPE_CYLINDER | LL_SCULPT_TYPE_MESH; +// for value checks, assign new value after adding new types +const U8 LL_SCULPT_TYPE_MAX = LL_SCULPT_TYPE_MESH; + const U8 LL_SCULPT_FLAG_INVERT = 64; const U8 LL_SCULPT_FLAG_MIRROR = 128; +const U8 LL_SCULPT_FLAG_MASK = LL_SCULPT_FLAG_INVERT | LL_SCULPT_FLAG_MIRROR; const S32 LL_SCULPT_MESH_MAX_FACES = 8; @@ -556,11 +560,10 @@ public: { } - LLVolumeParams(LLProfileParams &profile, LLPathParams &path, - LLUUID sculpt_id = LLUUID::null, U8 sculpt_type = LL_SCULPT_TYPE_NONE) - : mProfileParams(profile), mPathParams(path), mSculptID(sculpt_id), mSculptType(sculpt_type) - { - } + LLVolumeParams( LLProfileParams &profile, + LLPathParams &path, + LLUUID sculpt_id = LLUUID::null, + U8 sculpt_type = LL_SCULPT_TYPE_NONE); bool operator==(const LLVolumeParams ¶ms) const; bool operator!=(const LLVolumeParams ¶ms) const; -- cgit v1.2.3 From 35b47d202c96bb0ab9e0df1707d116c5c85fba09 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 15 Jul 2015 17:11:30 +0300 Subject: MAINT-5401 FIXED Automatic updates setting is confusing --- indra/newview/skins/default/xui/en/panel_preferences_setup.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml index 1e9a1aa27c..b201e071ef 100755 --- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml @@ -270,7 +270,7 @@ value="1" /> --> -- cgit v1.2.3 From 222a8b101c26472156dad950b1c48fdeb579ad60 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 15 Jul 2015 18:54:30 +0300 Subject: MAINT-5174 Add Check for Updates feature to Help menu --- .../viewer_components/updater/llupdaterservice.cpp | 48 ++++++++++++++++++---- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/indra/viewer_components/updater/llupdaterservice.cpp b/indra/viewer_components/updater/llupdaterservice.cpp index abf4ac5e21..788955a1b2 100755 --- a/indra/viewer_components/updater/llupdaterservice.cpp +++ b/indra/viewer_components/updater/llupdaterservice.cpp @@ -269,12 +269,40 @@ void LLUpdaterServiceImpl::stopChecking() bool LLUpdaterServiceImpl::forceCheck() { - if (mTimer.getStarted() - && !mIsDownloading) + if (!mIsDownloading && getState() != LLUpdaterService::CHECKING_FOR_UPDATE) { - mTimer.setTimerExpirySec(0); - setState(LLUpdaterService::CHECKING_FOR_UPDATE); - return true; + if (mIsChecking) + { + // Service is running, just reset the timer + if (mTimer.getStarted()) + { + mTimer.setTimerExpirySec(0); + setState(LLUpdaterService::CHECKING_FOR_UPDATE); + return true; + } + } + else if (!mChannel.empty() && !mVersion.empty()) + { + // one time check + bool has_install = checkForInstall(false); + if (!has_install) + { + std::string query_url = LLGridManager::getInstance()->getUpdateServiceURL(); + if (!query_url.empty()) + { + setState(LLUpdaterService::CHECKING_FOR_UPDATE); + mUpdateChecker.checkVersion(query_url, mChannel, mVersion, + mPlatform, mPlatformVersion, mUniqueId, + mWillingToTest); + return true; + } + else + { + LL_WARNS("UpdaterService") + << "No updater service defined for grid '" << LLGridManager::getInstance()->getGrid() << LL_ENDL; + } + } + } } return false; } @@ -415,9 +443,9 @@ bool LLUpdaterServiceImpl::checkForResume() void LLUpdaterServiceImpl::error(std::string const & message) { + setState(LLUpdaterService::TEMPORARY_ERROR); if(mIsChecking) { - setState(LLUpdaterService::TEMPORARY_ERROR); restartTimer(mCheckPeriod); } } @@ -462,8 +490,12 @@ void LLUpdaterServiceImpl::response(LLSD const & content) else { LL_WARNS("UpdaterService") << "Invalid update query response ignored; retry in " - << mCheckPeriod << " seconds" << LL_ENDL; - restartTimer(mCheckPeriod); + << mCheckPeriod << " seconds" << LL_ENDL; + setState(LLUpdaterService::TEMPORARY_ERROR); + if (mIsChecking) + { + restartTimer(mCheckPeriod); + } } } -- cgit v1.2.3 From 62c748936c42451d4a17c5321d804111203a9e4f Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Wed, 15 Jul 2015 23:58:56 +0300 Subject: MAINT-5019: Buildfix - added a tests for emails, improved handling of URLs starting with www. --- indra/llui/llurlentry.cpp | 2 +- indra/llui/tests/llurlentry_test.cpp | 76 ++++++++++++++++++++++++++---------- 2 files changed, 56 insertions(+), 22 deletions(-) diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 95f931de0a..91d655ee9e 100755 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -293,7 +293,7 @@ std::string LLUrlEntryHTTPLabel::getUrl(const std::string &string) const LLUrlEntryHTTPNoProtocol::LLUrlEntryHTTPNoProtocol() : LLUrlEntryBase() { - mPattern = boost::regex("\\bwww\\.\\S+\\.\\S+", // i.e. www.FOO.BAR + mPattern = boost::regex("\\bwww\\.\\S+\\.([^\\s<]*)?\\b", // i.e. www.FOO.BAR boost::regex::perl|boost::regex::icase); mMenuName = "menu_url_http.xml"; mTooltip = LLTrans::getString("TooltipHttpUrl"); diff --git a/indra/llui/tests/llurlentry_test.cpp b/indra/llui/tests/llurlentry_test.cpp index 15f2354552..a4ab6943b8 100755 --- a/indra/llui/tests/llurlentry_test.cpp +++ b/indra/llui/tests/llurlentry_test.cpp @@ -653,45 +653,45 @@ namespace tut void object::test<11>() { // - // test LLUrlEntryHTTPNoProtocol - general URLs without a protocol + // test LLUrlEntryHTTPNoProtocol - general URLs without a protocol, starting with "www." prefix (MAINT-5019) // LLUrlEntryHTTPNoProtocol url; testRegex("naked .com URL", url, "see google.com", - "http://google.com"); + ""); testRegex("naked .org URL", url, "see en.wikipedia.org for details", - "http://en.wikipedia.org"); + ""); testRegex("naked .net URL", url, "example.net", - "http://example.net"); + ""); - testRegex("naked .edu URL (2 instances)", url, + testRegex("naked .edu URL (2 instances), .www prefix", url, "MIT web site is at web.mit.edu and also www.mit.edu", - "http://web.mit.edu"); + "http://www.mit.edu"); testRegex("don't match e-mail addresses", url, "test@lindenlab.com", ""); - testRegex(".com URL with path", url, - "see secondlife.com/status for grid status", - "http://secondlife.com/status"); + testRegex("www.test.com URL with path", url, + "see www.test.com/status for grid status", + "http://www.test.com/status"); - testRegex(".com URL with port", url, - "secondlife.com:80", - "http://secondlife.com:80"); + testRegex("www.test.com URL with port", url, + "www.test.com:80", + "http://www.test.com:80"); - testRegex(".com URL with port and path", url, - "see secondlife.com:80/status", - "http://secondlife.com:80/status"); + testRegex("www.test.com URL with port and path", url, + "see www.test.com:80/status", + "http://www.test.com:80/status"); testRegex("www.*.com URL with port and path", url, - "see www.secondlife.com:80/status", - "http://www.secondlife.com:80/status"); + "see www.test.com:80/status", + "http://www.test.com:80/status"); testRegex("invalid .com URL [1]", url, "..com", @@ -714,12 +714,12 @@ namespace tut ""); testRegex("XML tags around URL [1]", url, - "secondlife.com", - "http://secondlife.com"); + "www.test.com", + "http://www.test.com"); testRegex("XML tags around URL [2]", url, - "secondlife.com/status?bar=1", - "http://secondlife.com/status?bar=1"); + "www.test.com/status?bar=1", + "http://www.test.com/status?bar=1"); } template<> template<> @@ -860,4 +860,38 @@ namespace tut "secondlife:///app/region/Product%20Engine", "Product Engine"); } + + template<> template<> + void object::test<14>() + { + // + // test LLUrlEntryemail - general emails + // + LLUrlEntryEmail url; + + // Regex tests. + testRegex("match e-mail addresses", url, + "test@lindenlab.com", + "mailto:test@lindenlab.com"); + + testRegex("match e-mail addresses with mailto: prefix", url, + "mailto:test@lindenlab.com", + "mailto:test@lindenlab.com"); + + testRegex("match e-mail addresses with different domains", url, + "test@foo.org.us", + "mailto:test@foo.org.us"); + + testRegex("match e-mail addresses with different domains", url, + "test@foo.bar", + "mailto:test@foo.bar"); + + testRegex("don't match incorrect e-mail addresses", url, + "test @foo.com", + ""); + + testRegex("don't match incorrect e-mail addresses", url, + "test@ foo.com", + ""); + } } -- cgit v1.2.3 From d9341caf45fa888824c93d9c2b24fdb7659f181b Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 17 Jul 2015 17:36:33 +0300 Subject: MAINT-5364 FIXED Object with invalid sculpt topology type cannot be seen or selected --- indra/llmath/llvolume.cpp | 29 +--------------------- indra/llmath/llvolume.h | 9 +++---- indra/llprimitive/llprimitive.cpp | 48 ++++++++++++++++++++++++++----------- indra/llprimitive/llprimitive.h | 3 +-- indra/newview/lllocalbitmaps.cpp | 2 +- indra/newview/llpanelobject.cpp | 5 ++-- indra/newview/lltooldraganddrop.cpp | 3 +-- 7 files changed, 46 insertions(+), 53 deletions(-) diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 82081ca853..41ee3941ac 100755 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -3178,16 +3178,6 @@ BOOL LLVolume::isFlat(S32 face) } -LLVolumeParams::LLVolumeParams( LLProfileParams &profile, - LLPathParams &path, - LLUUID sculpt_id, - U8 sculpt_type) : -mProfileParams(profile), -mPathParams(path) -{ - setSculptID(sculpt_id, sculpt_type); -} - bool LLVolumeParams::isSculpt() const { return mSculptID.notNull(); @@ -3504,24 +3494,7 @@ bool LLVolumeParams::setSkew(const F32 skew_value) bool LLVolumeParams::setSculptID(const LLUUID sculpt_id, U8 sculpt_type) { mSculptID = sculpt_id; - // Check sculpt type value, it consist of type and flags - U8 type = sculpt_type & LL_SCULPT_TYPE_MASK; - U8 flags = sculpt_type & LL_SCULPT_FLAG_MASK; - if (sculpt_type != (type | flags) || type > LL_SCULPT_TYPE_MAX) - { - if (sculpt_id != LLUUID::null) - { - mSculptType = LL_SCULPT_TYPE_MESH; - } - else - { - mSculptType = LL_SCULPT_TYPE_SPHERE; - } - } - else - { - mSculptType = sculpt_type; - } + mSculptType = sculpt_type; return true; } diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h index 06688cacc9..e1161682b5 100755 --- a/indra/llmath/llvolume.h +++ b/indra/llmath/llvolume.h @@ -560,10 +560,11 @@ public: { } - LLVolumeParams( LLProfileParams &profile, - LLPathParams &path, - LLUUID sculpt_id = LLUUID::null, - U8 sculpt_type = LL_SCULPT_TYPE_NONE); + LLVolumeParams(LLProfileParams &profile, LLPathParams &path, + LLUUID sculpt_id = LLUUID::null, U8 sculpt_type = LL_SCULPT_TYPE_NONE) + : mProfileParams(profile), mPathParams(path), mSculptID(sculpt_id), mSculptType(sculpt_type) + { + } bool operator==(const LLVolumeParams ¶ms) const; bool operator!=(const LLVolumeParams ¶ms) const; diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp index 8e009972d0..9eff74f1e8 100755 --- a/indra/llprimitive/llprimitive.cpp +++ b/indra/llprimitive/llprimitive.cpp @@ -1869,9 +1869,12 @@ BOOL LLSculptParams::pack(LLDataPacker &dp) const BOOL LLSculptParams::unpack(LLDataPacker &dp) { - dp.unpackUUID(mSculptTexture, "texture"); - dp.unpackU8(mSculptType, "type"); - + U8 type; + LLUUID id; + dp.unpackUUID(id, "texture"); + dp.unpackU8(type, "type"); + + setSculptTexture(id, type); return TRUE; } @@ -1896,8 +1899,7 @@ bool LLSculptParams::operator==(const LLNetworkData& data) const void LLSculptParams::copy(const LLNetworkData& data) { const LLSculptParams *param = (LLSculptParams*)&data; - mSculptTexture = param->mSculptTexture; - mSculptType = param->mSculptType; + setSculptTexture(param->mSculptTexture, param->mSculptType); } @@ -1915,20 +1917,38 @@ LLSD LLSculptParams::asLLSD() const bool LLSculptParams::fromLLSD(LLSD& sd) { const char *w; - w = "texture"; + U8 type; + w = "type"; if (sd.has(w)) { - setSculptTexture( sd[w] ); - } else goto fail; - w = "type"; + type = sd[w].asInteger(); + } + else return false; + + w = "texture"; if (sd.has(w)) { - setSculptType( (U8)sd[w].asInteger() ); - } else goto fail; - + setSculptTexture(sd[w], type); + } + else return false; + return true; - fail: - return false; +} + +void LLSculptParams::setSculptTexture(const LLUUID& texture_id, U8 sculpt_type) +{ + U8 type = sculpt_type & LL_SCULPT_TYPE_MASK; + U8 flags = sculpt_type & LL_SCULPT_FLAG_MASK; + if (sculpt_type != (type | flags) || type > LL_SCULPT_TYPE_MAX) + { + mSculptTexture.set(SCULPT_DEFAULT_TEXTURE); + mSculptType = LL_SCULPT_TYPE_SPHERE; + } + else + { + mSculptTexture = texture_id; + mSculptType = sculpt_type; + } } //============================================================================ diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h index db7327e900..54870fbb10 100755 --- a/indra/llprimitive/llprimitive.h +++ b/indra/llprimitive/llprimitive.h @@ -259,9 +259,8 @@ public: operator LLSD() const { return asLLSD(); } bool fromLLSD(LLSD& sd); - void setSculptTexture(const LLUUID& id) { mSculptTexture = id; } + void setSculptTexture(const LLUUID& texture_id, U8 sculpt_type); LLUUID getSculptTexture() const { return mSculptTexture; } - void setSculptType(U8 type) { mSculptType = type; } U8 getSculptType() const { return mSculptType; } }; diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index 4e9947fca0..46c1ffa789 100755 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -515,7 +515,7 @@ void LLLocalBitmap::updateUserSculpts(LLUUID old_id, LLUUID new_id) { LLSculptParams* old_params = (LLSculptParams*)object->getParameterEntry(LLNetworkData::PARAMS_SCULPT); LLSculptParams new_params(*old_params); - new_params.setSculptTexture(new_id); + new_params.setSculptTexture(new_id, (*old_params).getSculptType()); object->setParameterEntry(LLNetworkData::PARAMS_SCULPT, new_params, TRUE); } } diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 420f8fde2e..5dd44b4444 100755 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -1739,9 +1739,10 @@ void LLPanelObject::sendSculpt() return; LLSculptParams sculpt_params; + LLUUID sculpt_id = LLUUID::null; if (mCtrlSculptTexture) - sculpt_params.setSculptTexture(mCtrlSculptTexture->getImageAssetID()); + sculpt_id = mCtrlSculptTexture->getImageAssetID(); U8 sculpt_type = 0; @@ -1765,7 +1766,7 @@ void LLPanelObject::sendSculpt() if ((mCtrlSculptInvert) && (mCtrlSculptInvert->get())) sculpt_type |= LL_SCULPT_FLAG_INVERT; - sculpt_params.setSculptType(sculpt_type); + sculpt_params.setSculptTexture(sculpt_id, sculpt_type); mObject->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, TRUE); } diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index b8df063c53..b9177f2d12 100755 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1140,8 +1140,7 @@ void LLToolDragAndDrop::dropMesh(LLViewerObject* hit_obj, } LLSculptParams sculpt_params; - sculpt_params.setSculptTexture(asset_id); - sculpt_params.setSculptType(LL_SCULPT_TYPE_MESH); + sculpt_params.setSculptTexture(asset_id, LL_SCULPT_TYPE_MESH); hit_obj->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, TRUE); dialog_refresh_all(); -- cgit v1.2.3 From 269cc894a95904578fe34cd89c563dc650349df8 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Fri, 17 Jul 2015 07:31:36 +0300 Subject: MAINT-5416 FIXED cannot right-click a rigged mesh that's worn --- doc/contributions.txt | 1 + indra/newview/llspatialpartition.cpp | 17 ++++++++++------- indra/newview/llspatialpartition.h | 1 + indra/newview/lltooldraganddrop.cpp | 4 ++-- indra/newview/lltoolpie.cpp | 8 ++++---- indra/newview/lltoolplacer.cpp | 2 +- indra/newview/lltoolselect.cpp | 2 +- indra/newview/lltoolselectrect.cpp | 2 +- indra/newview/llviewerobject.cpp | 1 + indra/newview/llviewerobject.h | 1 + indra/newview/llviewerwindow.cpp | 25 +++++++++++++++---------- indra/newview/llviewerwindow.h | 6 +++++- indra/newview/llvoavatar.cpp | 4 +++- indra/newview/llvoavatar.h | 2 ++ indra/newview/llvograss.cpp | 2 +- indra/newview/llvograss.h | 1 + indra/newview/llvopartgroup.cpp | 1 + indra/newview/llvopartgroup.h | 1 + indra/newview/llvosurfacepatch.cpp | 2 +- indra/newview/llvosurfacepatch.h | 1 + indra/newview/llvotree.cpp | 2 +- indra/newview/llvotree.h | 1 + indra/newview/llvovolume.cpp | 16 +++++++--------- indra/newview/llvovolume.h | 3 ++- indra/newview/pipeline.cpp | 13 +++++++------ indra/newview/pipeline.h | 1 + 26 files changed, 73 insertions(+), 47 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index 211d4fcf08..45935fc811 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -766,6 +766,7 @@ Kitty Barnett STORM-1905 VWR-24217 STORM-1804 + MAINT-5416 Kolor Fall Komiko Okamoto Korvel Noh diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 5e342099d7..22944493c9 100755 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -3770,8 +3770,9 @@ public: LLVector4a *mTangent; LLDrawable* mHit; BOOL mPickTransparent; + BOOL mPickRigged; - LLOctreeIntersect(const LLVector4a& start, const LLVector4a& end, BOOL pick_transparent, + LLOctreeIntersect(const LLVector4a& start, const LLVector4a& end, BOOL pick_transparent, BOOL pick_rigged, S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent) : mStart(start), mEnd(end), @@ -3781,7 +3782,8 @@ public: mNormal(normal), mTangent(tangent), mHit(NULL), - mPickTransparent(pick_transparent) + mPickTransparent(pick_transparent), + mPickRigged(pick_rigged) { } @@ -3864,9 +3866,9 @@ public: if (vobj->isAvatar()) { LLVOAvatar* avatar = (LLVOAvatar*) vobj; - if (avatar->isSelf() && LLFloater::isVisible(gFloaterTools)) + if ((mPickRigged) || ((avatar->isSelf()) && (LLFloater::isVisible(gFloaterTools)))) { - LLViewerObject* hit = avatar->lineSegmentIntersectRiggedAttachments(mStart, mEnd, -1, mPickTransparent, mFaceHit, &intersection, mTexCoord, mNormal, mTangent); + LLViewerObject* hit = avatar->lineSegmentIntersectRiggedAttachments(mStart, mEnd, -1, mPickTransparent, mPickRigged, mFaceHit, &intersection, mTexCoord, mNormal, mTangent); if (hit) { mEnd = intersection; @@ -3882,7 +3884,7 @@ public: } } - if (!skip_check && vobj->lineSegmentIntersect(mStart, mEnd, -1, mPickTransparent, mFaceHit, &intersection, mTexCoord, mNormal, mTangent)) + if (!skip_check && vobj->lineSegmentIntersect(mStart, mEnd, -1, mPickTransparent, mPickRigged, mFaceHit, &intersection, mTexCoord, mNormal, mTangent)) { mEnd = intersection; // shorten ray so we only find CLOSER hits if (mIntersection) @@ -3900,7 +3902,8 @@ public: } LL_ALIGN_POSTFIX(16); LLDrawable* LLSpatialPartition::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, - BOOL pick_transparent, + BOOL pick_transparent, + BOOL pick_rigged, S32* face_hit, // return the face hit LLVector4a* intersection, // return the intersection point LLVector2* tex_coord, // return the texture coordinates of the intersection point @@ -3909,7 +3912,7 @@ LLDrawable* LLSpatialPartition::lineSegmentIntersect(const LLVector4a& start, co ) { - LLOctreeIntersect intersect(start, end, pick_transparent, face_hit, intersection, tex_coord, normal, tangent); + LLOctreeIntersect intersect(start, end, pick_transparent, pick_rigged, face_hit, intersection, tex_coord, normal, tangent); LLDrawable* drawable = intersect.check(mOctree); return drawable; diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h index 08a4d00d0f..7633e46200 100755 --- a/indra/newview/llspatialpartition.h +++ b/indra/newview/llspatialpartition.h @@ -386,6 +386,7 @@ public: LLDrawable* lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, BOOL pick_transparent, + BOOL pick_rigged, S32* face_hit, // return the face hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index b9177f2d12..2cc0cac1a8 100755 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -846,12 +846,12 @@ void LLToolDragAndDrop::dragOrDrop3D( S32 x, S32 y, MASK mask, BOOL drop, EAccep if (mDrop) { // don't allow drag and drop onto transparent objects - pick(gViewerWindow->pickImmediate(x, y, FALSE)); + pick(gViewerWindow->pickImmediate(x, y, FALSE, FALSE)); } else { // don't allow drag and drop onto transparent objects - gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE); + gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE, FALSE); } *acceptance = mLastAccept; diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 2081297717..c162345e07 100755 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -107,7 +107,7 @@ BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask) mMouseDownY = y; //left mouse down always picks transparent - mPick = gViewerWindow->pickImmediate(x, y, TRUE); + mPick = gViewerWindow->pickImmediate(x, y, TRUE, FALSE); mPick.mKeyMask = mask; mMouseButtonDown = true; @@ -122,7 +122,7 @@ BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask) BOOL LLToolPie::handleRightMouseDown(S32 x, S32 y, MASK mask) { // don't pick transparent so users can't "pay" transparent objects - mPick = gViewerWindow->pickImmediate(x, y, FALSE, TRUE); + mPick = gViewerWindow->pickImmediate(x, y, FALSE, TRUE, TRUE); mPick.mKeyMask = mask; // claim not handled so UI focus stays same @@ -546,7 +546,7 @@ void LLToolPie::selectionPropertiesReceived() BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask) { - mHoverPick = gViewerWindow->pickImmediate(x, y, FALSE); + mHoverPick = gViewerWindow->pickImmediate(x, y, FALSE, FALSE); LLViewerObject *parent = NULL; LLViewerObject *object = mHoverPick.getObject(); LLSelectMgr::getInstance()->setHoverObject(object, mHoverPick.mObjectFace); @@ -592,7 +592,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask) else { // perform a separate pick that detects transparent objects since they respond to 1-click actions - LLPickInfo click_action_pick = gViewerWindow->pickImmediate(x, y, TRUE); + LLPickInfo click_action_pick = gViewerWindow->pickImmediate(x, y, TRUE, FALSE); LLViewerObject* click_action_object = click_action_pick.getObject(); diff --git a/indra/newview/lltoolplacer.cpp b/indra/newview/lltoolplacer.cpp index ceb57d0172..814bade56a 100755 --- a/indra/newview/lltoolplacer.cpp +++ b/indra/newview/lltoolplacer.cpp @@ -80,7 +80,7 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj, // Viewer-side pick to find the right sim to create the object on. // First find the surface the object will be created on. - LLPickInfo pick = gViewerWindow->pickImmediate(x, y, FALSE); + LLPickInfo pick = gViewerWindow->pickImmediate(x, y, FALSE, FALSE); // Note: use the frontmost non-flora version because (a) plants usually have lots of alpha and (b) pants' Havok // representations (if any) are NOT the same as their viewer representation. diff --git a/indra/newview/lltoolselect.cpp b/indra/newview/lltoolselect.cpp index 812abe9dbd..1fcc9a0711 100755 --- a/indra/newview/lltoolselect.cpp +++ b/indra/newview/lltoolselect.cpp @@ -63,7 +63,7 @@ LLToolSelect::LLToolSelect( LLToolComposite* composite ) BOOL LLToolSelect::handleMouseDown(S32 x, S32 y, MASK mask) { // do immediate pick query - mPick = gViewerWindow->pickImmediate(x, y, TRUE); + mPick = gViewerWindow->pickImmediate(x, y, TRUE, FALSE); // Pass mousedown to agent LLTool::handleMouseDown(x, y, mask); diff --git a/indra/newview/lltoolselectrect.cpp b/indra/newview/lltoolselectrect.cpp index c5616fb208..71dc8001d4 100755 --- a/indra/newview/lltoolselectrect.cpp +++ b/indra/newview/lltoolselectrect.cpp @@ -71,7 +71,7 @@ void dialog_refresh_all(void); BOOL LLToolSelectRect::handleMouseDown(S32 x, S32 y, MASK mask) { - handlePick(gViewerWindow->pickImmediate(x, y, TRUE)); + handlePick(gViewerWindow->pickImmediate(x, y, TRUE, FALSE)); LLTool::handleMouseDown(x, y, mask); diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index c521b00372..43be12ea4b 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -4075,6 +4075,7 @@ LLViewerObject* LLViewerObject::getRootEdit() const BOOL LLViewerObject::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, + BOOL pick_rigged, S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index db2749f413..6cd5cefd93 100755 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -268,6 +268,7 @@ public: virtual BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES BOOL pick_transparent = FALSE, + BOOL pick_rigged = FALSE, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index ba84d7aa2c..0e30c79796 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1137,7 +1137,7 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi if (prim_media_dnd_enabled) { - LLPickInfo pick_info = pickImmediate( pos.mX, pos.mY, TRUE /*BOOL pick_transparent*/ ); + LLPickInfo pick_info = pickImmediate( pos.mX, pos.mY, TRUE /*BOOL pick_transparent*/, FALSE ); LLUUID object_id = pick_info.getObjectID(); S32 object_face = pick_info.mObjectFace; @@ -2936,7 +2936,7 @@ void LLViewerWindow::updateUI() if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_RAYCAST)) { gDebugRaycastFaceHit = -1; - gDebugRaycastObject = cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, + gDebugRaycastObject = cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, FALSE, &gDebugRaycastFaceHit, &gDebugRaycastIntersection, &gDebugRaycastTexCoord, @@ -3764,6 +3764,7 @@ void LLViewerWindow::pickAsync( S32 x, MASK mask, void (*callback)(const LLPickInfo& info), BOOL pick_transparent, + BOOL pick_rigged, BOOL pick_unselectable) { BOOL in_build_mode = LLFloaterReg::instanceVisible("build"); @@ -3774,7 +3775,7 @@ void LLViewerWindow::pickAsync( S32 x, pick_transparent = TRUE; } - LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, FALSE, TRUE, pick_unselectable, callback); + LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, pick_rigged, FALSE, TRUE, pick_unselectable, callback); schedulePick(pick_info); } @@ -3830,7 +3831,7 @@ void LLViewerWindow::returnEmptyPicks() } // Performs the GL object/land pick. -LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_transparent, BOOL pick_particle) +LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_particle) { BOOL in_build_mode = LLFloaterReg::instanceVisible("build"); if (in_build_mode || LLDrawPoolAlpha::sShowDebugAlpha) @@ -3842,7 +3843,7 @@ LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_trans // shortcut queueing in mPicks and just update mLastPick in place MASK key_mask = gKeyboard->currentMask(TRUE); - mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_particle, TRUE, FALSE, NULL); + mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_rigged, pick_particle, TRUE, FALSE, NULL); mLastPick.fetchResults(); return mLastPick; @@ -3878,6 +3879,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de LLViewerObject *this_object, S32 this_face, BOOL pick_transparent, + BOOL pick_rigged, S32* face_hit, LLVector4a *intersection, LLVector2 *uv, @@ -3948,7 +3950,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de { if (this_object->isHUDAttachment()) // is a HUD object? { - if (this_object->lineSegmentIntersect(mh_start, mh_end, this_face, pick_transparent, + if (this_object->lineSegmentIntersect(mh_start, mh_end, this_face, pick_transparent, pick_rigged, face_hit, intersection, uv, normal, tangent)) { found = this_object; @@ -3956,7 +3958,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de } else // is a world object { - if (this_object->lineSegmentIntersect(mw_start, mw_end, this_face, pick_transparent, + if (this_object->lineSegmentIntersect(mw_start, mw_end, this_face, pick_transparent, pick_rigged, face_hit, intersection, uv, normal, tangent)) { found = this_object; @@ -3970,7 +3972,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de if (!found) // if not found in HUD, look in world: { - found = gPipeline.lineSegmentIntersectInWorld(mw_start, mw_end, pick_transparent, + found = gPipeline.lineSegmentIntersectInWorld(mw_start, mw_end, pick_transparent, pick_rigged, face_hit, intersection, uv, normal, tangent); if (found && !pick_transparent) { @@ -5246,6 +5248,7 @@ LLPickInfo::LLPickInfo() mBinormal(), mHUDIcon(NULL), mPickTransparent(FALSE), + mPickRigged(FALSE), mPickParticle(FALSE) { } @@ -5253,6 +5256,7 @@ LLPickInfo::LLPickInfo() LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos, MASK keyboard_mask, BOOL pick_transparent, + BOOL pick_rigged, BOOL pick_particle, BOOL pick_uv_coords, BOOL pick_unselectable, @@ -5271,6 +5275,7 @@ LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos, mBinormal(), mHUDIcon(NULL), mPickTransparent(pick_transparent), + mPickRigged(pick_rigged), mPickParticle(pick_particle), mPickUnselectable(pick_unselectable) { @@ -5302,7 +5307,7 @@ void LLPickInfo::fetchResults() } LLViewerObject* hit_object = gViewerWindow->cursorIntersect(mMousePt.mX, mMousePt.mY, 512.f, - NULL, -1, mPickTransparent, &face_hit, + NULL, -1, mPickTransparent, mPickRigged, &face_hit, &intersection, &uv, &normal, &tangent, &start, &end); mPickPt = mMousePt; @@ -5447,7 +5452,7 @@ void LLPickInfo::getSurfaceInfo() if (objectp) { if (gViewerWindow->cursorIntersect(ll_round((F32)mMousePt.mX), ll_round((F32)mMousePt.mY), 1024.f, - objectp, -1, mPickTransparent, + objectp, -1, mPickTransparent, mPickRigged, &mObjectFace, &intersection, &mSTCoords, diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 7fde52d4e1..52f51d4c97 100755 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -89,6 +89,7 @@ public: LLPickInfo(const LLCoordGL& mouse_pos, MASK keyboard_mask, BOOL pick_transparent, + BOOL pick_rigged, BOOL pick_particle, BOOL pick_surface_info, BOOL pick_unselectable, @@ -123,6 +124,7 @@ public: LLVector4 mTangent; LLVector3 mBinormal; BOOL mPickTransparent; + BOOL mPickRigged; BOOL mPickParticle; BOOL mPickUnselectable; void getSurfaceInfo(); @@ -367,8 +369,9 @@ public: MASK mask, void (*callback)(const LLPickInfo& pick_info), BOOL pick_transparent = FALSE, + BOOL pick_rigged = FALSE, BOOL pick_unselectable = FALSE); - LLPickInfo pickImmediate(S32 x, S32 y, BOOL pick_transparent, BOOL pick_particle = FALSE); + LLPickInfo pickImmediate(S32 x, S32 y, BOOL pick_transparent, BOOL pick_rigged = FALSE, BOOL pick_particle = FALSE); LLHUDIcon* cursorIntersectIcon(S32 mouse_x, S32 mouse_y, F32 depth, LLVector4a* intersection); @@ -376,6 +379,7 @@ public: LLViewerObject *this_object = NULL, S32 this_face = -1, BOOL pick_transparent = FALSE, + BOOL pick_rigged = FALSE, S32* face_hit = NULL, LLVector4a *intersection = NULL, LLVector2 *uv = NULL, diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index b97a1bde99..6f7b23ba01 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1511,6 +1511,7 @@ void LLVOAvatar::renderJoints() BOOL LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, + BOOL pick_rigged, S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, @@ -1610,6 +1611,7 @@ BOOL LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, + BOOL pick_rigged, S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, @@ -1640,7 +1642,7 @@ LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector { LLViewerObject* attached_object = (*attachment_iter); - if (attached_object->lineSegmentIntersect(start, local_end, face, pick_transparent, face_hit, &local_intersection, tex_coord, normal, tangent)) + if (attached_object->lineSegmentIntersect(start, local_end, face, pick_transparent, pick_rigged, face_hit, &local_intersection, tex_coord, normal, tangent)) { local_end = local_intersection; if (intersection) diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 5b4379165a..09d8662034 100755 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -165,6 +165,7 @@ public: /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES BOOL pick_transparent = FALSE, + BOOL pick_rigged = FALSE, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point @@ -173,6 +174,7 @@ public: LLViewerObject* lineSegmentIntersectRiggedAttachments(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES BOOL pick_transparent = FALSE, + BOOL pick_rigged = FALSE, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index 8d8f33b601..de63a3963c 100755 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -770,7 +770,7 @@ void LLVOGrass::updateDrawable(BOOL force_damped) } // virtual -BOOL LLVOGrass::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, S32 *face_hitp, +BOOL LLVOGrass::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, S32 *face_hitp, LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent) { diff --git a/indra/newview/llvograss.h b/indra/newview/llvograss.h index 71d358362d..5634e048eb 100755 --- a/indra/newview/llvograss.h +++ b/indra/newview/llvograss.h @@ -78,6 +78,7 @@ public: /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES BOOL pick_transparent = FALSE, + BOOL pick_rigged = FALSE, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index 1ba0868544..6e5db526b0 100755 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -469,6 +469,7 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable) BOOL LLVOPartGroup::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, + BOOL pick_rigged, S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, diff --git a/indra/newview/llvopartgroup.h b/indra/newview/llvopartgroup.h index a94a2291ed..2ef8b1c848 100755 --- a/indra/newview/llvopartgroup.h +++ b/indra/newview/llvopartgroup.h @@ -72,6 +72,7 @@ public: /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, + BOOL pick_rigged, S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp index 79e1921f1b..897bace4e1 100755 --- a/indra/newview/llvosurfacepatch.cpp +++ b/indra/newview/llvosurfacepatch.cpp @@ -936,7 +936,7 @@ void LLVOSurfacePatch::getGeomSizesEast(const S32 stride, const S32 east_stride, } } -BOOL LLVOSurfacePatch::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, S32 *face_hitp, +BOOL LLVOSurfacePatch::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, S32 *face_hitp, LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent) { diff --git a/indra/newview/llvosurfacepatch.h b/indra/newview/llvosurfacepatch.h index 3383b16dd9..884dbb3be3 100755 --- a/indra/newview/llvosurfacepatch.h +++ b/indra/newview/llvosurfacepatch.h @@ -84,6 +84,7 @@ public: /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES BOOL pick_transparent = FALSE, + BOOL pick_rigged = FALSE, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index 367fa21b91..4dcc267e96 100755 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -1110,7 +1110,7 @@ void LLVOTree::updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax) mDrawable->setPositionGroup(pos); } -BOOL LLVOTree::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, S32 *face_hitp, +BOOL LLVOTree::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, S32 *face_hitp, LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent) { diff --git a/indra/newview/llvotree.h b/indra/newview/llvotree.h index c862de8230..c16ed70bb4 100755 --- a/indra/newview/llvotree.h +++ b/indra/newview/llvotree.h @@ -108,6 +108,7 @@ public: /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES BOOL pick_transparent = FALSE, + BOOL pick_rigged = FALSE, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 4b0e4514a0..46e853c1e0 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -3883,7 +3883,7 @@ LLVector3 LLVOVolume::volumeDirectionToAgent(const LLVector3& dir) const } -BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, S32 *face_hitp, +BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, S32 *face_hitp, LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent) { @@ -3902,9 +3902,9 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& if (mDrawable->isState(LLDrawable::RIGGED)) { - if (LLFloater::isVisible(gFloaterTools) && getAvatar()->isSelf()) + if ((pick_rigged) || ((getAvatar()->isSelf()) && (LLFloater::isVisible(gFloaterTools)))) { - updateRiggedVolume(); + updateRiggedVolume(true); volume = mRiggedVolume; transform = false; } @@ -4083,10 +4083,8 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& bool LLVOVolume::treatAsRigged() { - return LLFloater::isVisible(gFloaterTools) && - isAttachment() && - getAvatar() && - getAvatar()->isSelf() && + return isSelected() && + isAttachment() && mDrawable.notNull() && mDrawable->isState(LLDrawable::RIGGED); } @@ -4105,12 +4103,12 @@ void LLVOVolume::clearRiggedVolume() } } -void LLVOVolume::updateRiggedVolume() +void LLVOVolume::updateRiggedVolume(bool force_update) { //Update mRiggedVolume to match current animation frame of avatar. //Also update position/size in octree. - if (!treatAsRigged()) + if ((!force_update) && (!treatAsRigged())) { clearRiggedVolume(); diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index ff7438ac09..de87c85c89 100755 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -140,6 +140,7 @@ public: /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES BOOL pick_transparent = FALSE, + BOOL pick_rigged = FALSE, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point @@ -312,7 +313,7 @@ public: //rigged volume update (for raycasting) - void updateRiggedVolume(); + void updateRiggedVolume(bool force_update = false); LLRiggedVolume* getRiggedVolume(); //returns true if volume should be treated as a rigged volume diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 03712c1065..3c58ce0c09 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7059,7 +7059,7 @@ LLVOPartGroup* LLPipeline::lineSegmentIntersectParticle(const LLVector4a& start, LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_PARTICLE); if (part && hasRenderType(part->mDrawableType)) { - LLDrawable* hit = part->lineSegmentIntersect(start, local_end, TRUE, face_hit, &position, NULL, NULL, NULL); + LLDrawable* hit = part->lineSegmentIntersect(start, local_end, TRUE, FALSE, face_hit, &position, NULL, NULL, NULL); if (hit) { drawable = hit; @@ -7085,7 +7085,8 @@ LLVOPartGroup* LLPipeline::lineSegmentIntersectParticle(const LLVector4a& start, } LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start, const LLVector4a& end, - BOOL pick_transparent, + BOOL pick_transparent, + BOOL pick_rigged, S32* face_hit, LLVector4a* intersection, // return the intersection point LLVector2* tex_coord, // return the texture coordinates of the intersection point @@ -7117,7 +7118,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start, LLSpatialPartition* part = region->getSpatialPartition(j); if (part && hasRenderType(part->mDrawableType)) { - LLDrawable* hit = part->lineSegmentIntersect(start, local_end, pick_transparent, face_hit, &position, tex_coord, normal, tangent); + LLDrawable* hit = part->lineSegmentIntersect(start, local_end, pick_transparent, pick_rigged, face_hit, &position, tex_coord, normal, tangent); if (hit) { drawable = hit; @@ -7174,7 +7175,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start, LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_BRIDGE); if (part && hasRenderType(part->mDrawableType)) { - LLDrawable* hit = part->lineSegmentIntersect(start, local_end, pick_transparent, face_hit, &position, tex_coord, normal, tangent); + LLDrawable* hit = part->lineSegmentIntersect(start, local_end, pick_transparent, pick_rigged, face_hit, &position, tex_coord, normal, tangent); if (hit) { LLVector4a delta; @@ -7262,7 +7263,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInHUD(const LLVector4a& start, c LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_HUD); if (part) { - LLDrawable* hit = part->lineSegmentIntersect(start, end, pick_transparent, face_hit, intersection, tex_coord, normal, tangent); + LLDrawable* hit = part->lineSegmentIntersect(start, end, pick_transparent, FALSE, face_hit, intersection, tex_coord, normal, tangent); if (hit) { drawable = hit; @@ -7709,7 +7710,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) LLVector4a result; result.clear(); - gViewerWindow->cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, + gViewerWindow->cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, FALSE, NULL, &result); diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index ce2f4b17b1..97e11a151f 100755 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -183,6 +183,7 @@ public: //get the object between start and end that's closest to start. LLViewerObject* lineSegmentIntersectInWorld(const LLVector4a& start, const LLVector4a& end, BOOL pick_transparent, + BOOL pick_rigged, S32* face_hit, // return the face hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point -- cgit v1.2.3 From 57904b4def8c75a865ba503976de98d9ee4c0d94 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Thu, 23 Jul 2015 23:59:05 +0300 Subject: MAINT-5416 Reverted changeset: 9bd24c17d908 --- doc/contributions.txt | 1 - indra/newview/llspatialpartition.cpp | 17 +++++++---------- indra/newview/llspatialpartition.h | 1 - indra/newview/lltooldraganddrop.cpp | 4 ++-- indra/newview/lltoolpie.cpp | 8 ++++---- indra/newview/lltoolplacer.cpp | 2 +- indra/newview/lltoolselect.cpp | 2 +- indra/newview/lltoolselectrect.cpp | 2 +- indra/newview/llviewerobject.cpp | 1 - indra/newview/llviewerobject.h | 1 - indra/newview/llviewerwindow.cpp | 25 ++++++++++--------------- indra/newview/llviewerwindow.h | 6 +----- indra/newview/llvoavatar.cpp | 4 +--- indra/newview/llvoavatar.h | 2 -- indra/newview/llvograss.cpp | 2 +- indra/newview/llvograss.h | 1 - indra/newview/llvopartgroup.cpp | 1 - indra/newview/llvopartgroup.h | 1 - indra/newview/llvosurfacepatch.cpp | 2 +- indra/newview/llvosurfacepatch.h | 1 - indra/newview/llvotree.cpp | 2 +- indra/newview/llvotree.h | 1 - indra/newview/llvovolume.cpp | 16 +++++++++------- indra/newview/llvovolume.h | 3 +-- indra/newview/pipeline.cpp | 13 ++++++------- indra/newview/pipeline.h | 1 - 26 files changed, 47 insertions(+), 73 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index 45935fc811..211d4fcf08 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -766,7 +766,6 @@ Kitty Barnett STORM-1905 VWR-24217 STORM-1804 - MAINT-5416 Kolor Fall Komiko Okamoto Korvel Noh diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 22944493c9..5e342099d7 100755 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -3770,9 +3770,8 @@ public: LLVector4a *mTangent; LLDrawable* mHit; BOOL mPickTransparent; - BOOL mPickRigged; - LLOctreeIntersect(const LLVector4a& start, const LLVector4a& end, BOOL pick_transparent, BOOL pick_rigged, + LLOctreeIntersect(const LLVector4a& start, const LLVector4a& end, BOOL pick_transparent, S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent) : mStart(start), mEnd(end), @@ -3782,8 +3781,7 @@ public: mNormal(normal), mTangent(tangent), mHit(NULL), - mPickTransparent(pick_transparent), - mPickRigged(pick_rigged) + mPickTransparent(pick_transparent) { } @@ -3866,9 +3864,9 @@ public: if (vobj->isAvatar()) { LLVOAvatar* avatar = (LLVOAvatar*) vobj; - if ((mPickRigged) || ((avatar->isSelf()) && (LLFloater::isVisible(gFloaterTools)))) + if (avatar->isSelf() && LLFloater::isVisible(gFloaterTools)) { - LLViewerObject* hit = avatar->lineSegmentIntersectRiggedAttachments(mStart, mEnd, -1, mPickTransparent, mPickRigged, mFaceHit, &intersection, mTexCoord, mNormal, mTangent); + LLViewerObject* hit = avatar->lineSegmentIntersectRiggedAttachments(mStart, mEnd, -1, mPickTransparent, mFaceHit, &intersection, mTexCoord, mNormal, mTangent); if (hit) { mEnd = intersection; @@ -3884,7 +3882,7 @@ public: } } - if (!skip_check && vobj->lineSegmentIntersect(mStart, mEnd, -1, mPickTransparent, mPickRigged, mFaceHit, &intersection, mTexCoord, mNormal, mTangent)) + if (!skip_check && vobj->lineSegmentIntersect(mStart, mEnd, -1, mPickTransparent, mFaceHit, &intersection, mTexCoord, mNormal, mTangent)) { mEnd = intersection; // shorten ray so we only find CLOSER hits if (mIntersection) @@ -3902,8 +3900,7 @@ public: } LL_ALIGN_POSTFIX(16); LLDrawable* LLSpatialPartition::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, - BOOL pick_transparent, - BOOL pick_rigged, + BOOL pick_transparent, S32* face_hit, // return the face hit LLVector4a* intersection, // return the intersection point LLVector2* tex_coord, // return the texture coordinates of the intersection point @@ -3912,7 +3909,7 @@ LLDrawable* LLSpatialPartition::lineSegmentIntersect(const LLVector4a& start, co ) { - LLOctreeIntersect intersect(start, end, pick_transparent, pick_rigged, face_hit, intersection, tex_coord, normal, tangent); + LLOctreeIntersect intersect(start, end, pick_transparent, face_hit, intersection, tex_coord, normal, tangent); LLDrawable* drawable = intersect.check(mOctree); return drawable; diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h index 7633e46200..08a4d00d0f 100755 --- a/indra/newview/llspatialpartition.h +++ b/indra/newview/llspatialpartition.h @@ -386,7 +386,6 @@ public: LLDrawable* lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, BOOL pick_transparent, - BOOL pick_rigged, S32* face_hit, // return the face hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 2cc0cac1a8..b9177f2d12 100755 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -846,12 +846,12 @@ void LLToolDragAndDrop::dragOrDrop3D( S32 x, S32 y, MASK mask, BOOL drop, EAccep if (mDrop) { // don't allow drag and drop onto transparent objects - pick(gViewerWindow->pickImmediate(x, y, FALSE, FALSE)); + pick(gViewerWindow->pickImmediate(x, y, FALSE)); } else { // don't allow drag and drop onto transparent objects - gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE, FALSE); + gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE); } *acceptance = mLastAccept; diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index c162345e07..2081297717 100755 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -107,7 +107,7 @@ BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask) mMouseDownY = y; //left mouse down always picks transparent - mPick = gViewerWindow->pickImmediate(x, y, TRUE, FALSE); + mPick = gViewerWindow->pickImmediate(x, y, TRUE); mPick.mKeyMask = mask; mMouseButtonDown = true; @@ -122,7 +122,7 @@ BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask) BOOL LLToolPie::handleRightMouseDown(S32 x, S32 y, MASK mask) { // don't pick transparent so users can't "pay" transparent objects - mPick = gViewerWindow->pickImmediate(x, y, FALSE, TRUE, TRUE); + mPick = gViewerWindow->pickImmediate(x, y, FALSE, TRUE); mPick.mKeyMask = mask; // claim not handled so UI focus stays same @@ -546,7 +546,7 @@ void LLToolPie::selectionPropertiesReceived() BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask) { - mHoverPick = gViewerWindow->pickImmediate(x, y, FALSE, FALSE); + mHoverPick = gViewerWindow->pickImmediate(x, y, FALSE); LLViewerObject *parent = NULL; LLViewerObject *object = mHoverPick.getObject(); LLSelectMgr::getInstance()->setHoverObject(object, mHoverPick.mObjectFace); @@ -592,7 +592,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask) else { // perform a separate pick that detects transparent objects since they respond to 1-click actions - LLPickInfo click_action_pick = gViewerWindow->pickImmediate(x, y, TRUE, FALSE); + LLPickInfo click_action_pick = gViewerWindow->pickImmediate(x, y, TRUE); LLViewerObject* click_action_object = click_action_pick.getObject(); diff --git a/indra/newview/lltoolplacer.cpp b/indra/newview/lltoolplacer.cpp index 814bade56a..ceb57d0172 100755 --- a/indra/newview/lltoolplacer.cpp +++ b/indra/newview/lltoolplacer.cpp @@ -80,7 +80,7 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj, // Viewer-side pick to find the right sim to create the object on. // First find the surface the object will be created on. - LLPickInfo pick = gViewerWindow->pickImmediate(x, y, FALSE, FALSE); + LLPickInfo pick = gViewerWindow->pickImmediate(x, y, FALSE); // Note: use the frontmost non-flora version because (a) plants usually have lots of alpha and (b) pants' Havok // representations (if any) are NOT the same as their viewer representation. diff --git a/indra/newview/lltoolselect.cpp b/indra/newview/lltoolselect.cpp index 1fcc9a0711..812abe9dbd 100755 --- a/indra/newview/lltoolselect.cpp +++ b/indra/newview/lltoolselect.cpp @@ -63,7 +63,7 @@ LLToolSelect::LLToolSelect( LLToolComposite* composite ) BOOL LLToolSelect::handleMouseDown(S32 x, S32 y, MASK mask) { // do immediate pick query - mPick = gViewerWindow->pickImmediate(x, y, TRUE, FALSE); + mPick = gViewerWindow->pickImmediate(x, y, TRUE); // Pass mousedown to agent LLTool::handleMouseDown(x, y, mask); diff --git a/indra/newview/lltoolselectrect.cpp b/indra/newview/lltoolselectrect.cpp index 71dc8001d4..c5616fb208 100755 --- a/indra/newview/lltoolselectrect.cpp +++ b/indra/newview/lltoolselectrect.cpp @@ -71,7 +71,7 @@ void dialog_refresh_all(void); BOOL LLToolSelectRect::handleMouseDown(S32 x, S32 y, MASK mask) { - handlePick(gViewerWindow->pickImmediate(x, y, TRUE, FALSE)); + handlePick(gViewerWindow->pickImmediate(x, y, TRUE)); LLTool::handleMouseDown(x, y, mask); diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 43be12ea4b..c521b00372 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -4075,7 +4075,6 @@ LLViewerObject* LLViewerObject::getRootEdit() const BOOL LLViewerObject::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, - BOOL pick_rigged, S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 6cd5cefd93..db2749f413 100755 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -268,7 +268,6 @@ public: virtual BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES BOOL pick_transparent = FALSE, - BOOL pick_rigged = FALSE, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 0e30c79796..ba84d7aa2c 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1137,7 +1137,7 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi if (prim_media_dnd_enabled) { - LLPickInfo pick_info = pickImmediate( pos.mX, pos.mY, TRUE /*BOOL pick_transparent*/, FALSE ); + LLPickInfo pick_info = pickImmediate( pos.mX, pos.mY, TRUE /*BOOL pick_transparent*/ ); LLUUID object_id = pick_info.getObjectID(); S32 object_face = pick_info.mObjectFace; @@ -2936,7 +2936,7 @@ void LLViewerWindow::updateUI() if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_RAYCAST)) { gDebugRaycastFaceHit = -1; - gDebugRaycastObject = cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, FALSE, + gDebugRaycastObject = cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, &gDebugRaycastFaceHit, &gDebugRaycastIntersection, &gDebugRaycastTexCoord, @@ -3764,7 +3764,6 @@ void LLViewerWindow::pickAsync( S32 x, MASK mask, void (*callback)(const LLPickInfo& info), BOOL pick_transparent, - BOOL pick_rigged, BOOL pick_unselectable) { BOOL in_build_mode = LLFloaterReg::instanceVisible("build"); @@ -3775,7 +3774,7 @@ void LLViewerWindow::pickAsync( S32 x, pick_transparent = TRUE; } - LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, pick_rigged, FALSE, TRUE, pick_unselectable, callback); + LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, FALSE, TRUE, pick_unselectable, callback); schedulePick(pick_info); } @@ -3831,7 +3830,7 @@ void LLViewerWindow::returnEmptyPicks() } // Performs the GL object/land pick. -LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_particle) +LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_transparent, BOOL pick_particle) { BOOL in_build_mode = LLFloaterReg::instanceVisible("build"); if (in_build_mode || LLDrawPoolAlpha::sShowDebugAlpha) @@ -3843,7 +3842,7 @@ LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_transp // shortcut queueing in mPicks and just update mLastPick in place MASK key_mask = gKeyboard->currentMask(TRUE); - mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_rigged, pick_particle, TRUE, FALSE, NULL); + mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_particle, TRUE, FALSE, NULL); mLastPick.fetchResults(); return mLastPick; @@ -3879,7 +3878,6 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de LLViewerObject *this_object, S32 this_face, BOOL pick_transparent, - BOOL pick_rigged, S32* face_hit, LLVector4a *intersection, LLVector2 *uv, @@ -3950,7 +3948,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de { if (this_object->isHUDAttachment()) // is a HUD object? { - if (this_object->lineSegmentIntersect(mh_start, mh_end, this_face, pick_transparent, pick_rigged, + if (this_object->lineSegmentIntersect(mh_start, mh_end, this_face, pick_transparent, face_hit, intersection, uv, normal, tangent)) { found = this_object; @@ -3958,7 +3956,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de } else // is a world object { - if (this_object->lineSegmentIntersect(mw_start, mw_end, this_face, pick_transparent, pick_rigged, + if (this_object->lineSegmentIntersect(mw_start, mw_end, this_face, pick_transparent, face_hit, intersection, uv, normal, tangent)) { found = this_object; @@ -3972,7 +3970,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de if (!found) // if not found in HUD, look in world: { - found = gPipeline.lineSegmentIntersectInWorld(mw_start, mw_end, pick_transparent, pick_rigged, + found = gPipeline.lineSegmentIntersectInWorld(mw_start, mw_end, pick_transparent, face_hit, intersection, uv, normal, tangent); if (found && !pick_transparent) { @@ -5248,7 +5246,6 @@ LLPickInfo::LLPickInfo() mBinormal(), mHUDIcon(NULL), mPickTransparent(FALSE), - mPickRigged(FALSE), mPickParticle(FALSE) { } @@ -5256,7 +5253,6 @@ LLPickInfo::LLPickInfo() LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos, MASK keyboard_mask, BOOL pick_transparent, - BOOL pick_rigged, BOOL pick_particle, BOOL pick_uv_coords, BOOL pick_unselectable, @@ -5275,7 +5271,6 @@ LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos, mBinormal(), mHUDIcon(NULL), mPickTransparent(pick_transparent), - mPickRigged(pick_rigged), mPickParticle(pick_particle), mPickUnselectable(pick_unselectable) { @@ -5307,7 +5302,7 @@ void LLPickInfo::fetchResults() } LLViewerObject* hit_object = gViewerWindow->cursorIntersect(mMousePt.mX, mMousePt.mY, 512.f, - NULL, -1, mPickTransparent, mPickRigged, &face_hit, + NULL, -1, mPickTransparent, &face_hit, &intersection, &uv, &normal, &tangent, &start, &end); mPickPt = mMousePt; @@ -5452,7 +5447,7 @@ void LLPickInfo::getSurfaceInfo() if (objectp) { if (gViewerWindow->cursorIntersect(ll_round((F32)mMousePt.mX), ll_round((F32)mMousePt.mY), 1024.f, - objectp, -1, mPickTransparent, mPickRigged, + objectp, -1, mPickTransparent, &mObjectFace, &intersection, &mSTCoords, diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 52f51d4c97..7fde52d4e1 100755 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -89,7 +89,6 @@ public: LLPickInfo(const LLCoordGL& mouse_pos, MASK keyboard_mask, BOOL pick_transparent, - BOOL pick_rigged, BOOL pick_particle, BOOL pick_surface_info, BOOL pick_unselectable, @@ -124,7 +123,6 @@ public: LLVector4 mTangent; LLVector3 mBinormal; BOOL mPickTransparent; - BOOL mPickRigged; BOOL mPickParticle; BOOL mPickUnselectable; void getSurfaceInfo(); @@ -369,9 +367,8 @@ public: MASK mask, void (*callback)(const LLPickInfo& pick_info), BOOL pick_transparent = FALSE, - BOOL pick_rigged = FALSE, BOOL pick_unselectable = FALSE); - LLPickInfo pickImmediate(S32 x, S32 y, BOOL pick_transparent, BOOL pick_rigged = FALSE, BOOL pick_particle = FALSE); + LLPickInfo pickImmediate(S32 x, S32 y, BOOL pick_transparent, BOOL pick_particle = FALSE); LLHUDIcon* cursorIntersectIcon(S32 mouse_x, S32 mouse_y, F32 depth, LLVector4a* intersection); @@ -379,7 +376,6 @@ public: LLViewerObject *this_object = NULL, S32 this_face = -1, BOOL pick_transparent = FALSE, - BOOL pick_rigged = FALSE, S32* face_hit = NULL, LLVector4a *intersection = NULL, LLVector2 *uv = NULL, diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 6f7b23ba01..b97a1bde99 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1511,7 +1511,6 @@ void LLVOAvatar::renderJoints() BOOL LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, - BOOL pick_rigged, S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, @@ -1611,7 +1610,6 @@ BOOL LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, - BOOL pick_rigged, S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, @@ -1642,7 +1640,7 @@ LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector { LLViewerObject* attached_object = (*attachment_iter); - if (attached_object->lineSegmentIntersect(start, local_end, face, pick_transparent, pick_rigged, face_hit, &local_intersection, tex_coord, normal, tangent)) + if (attached_object->lineSegmentIntersect(start, local_end, face, pick_transparent, face_hit, &local_intersection, tex_coord, normal, tangent)) { local_end = local_intersection; if (intersection) diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 09d8662034..5b4379165a 100755 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -165,7 +165,6 @@ public: /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES BOOL pick_transparent = FALSE, - BOOL pick_rigged = FALSE, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point @@ -174,7 +173,6 @@ public: LLViewerObject* lineSegmentIntersectRiggedAttachments(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES BOOL pick_transparent = FALSE, - BOOL pick_rigged = FALSE, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index de63a3963c..8d8f33b601 100755 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -770,7 +770,7 @@ void LLVOGrass::updateDrawable(BOOL force_damped) } // virtual -BOOL LLVOGrass::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, S32 *face_hitp, +BOOL LLVOGrass::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, S32 *face_hitp, LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent) { diff --git a/indra/newview/llvograss.h b/indra/newview/llvograss.h index 5634e048eb..71d358362d 100755 --- a/indra/newview/llvograss.h +++ b/indra/newview/llvograss.h @@ -78,7 +78,6 @@ public: /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES BOOL pick_transparent = FALSE, - BOOL pick_rigged = FALSE, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index 6e5db526b0..1ba0868544 100755 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -469,7 +469,6 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable) BOOL LLVOPartGroup::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, - BOOL pick_rigged, S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, diff --git a/indra/newview/llvopartgroup.h b/indra/newview/llvopartgroup.h index 2ef8b1c848..a94a2291ed 100755 --- a/indra/newview/llvopartgroup.h +++ b/indra/newview/llvopartgroup.h @@ -72,7 +72,6 @@ public: /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, - BOOL pick_rigged, S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp index 897bace4e1..79e1921f1b 100755 --- a/indra/newview/llvosurfacepatch.cpp +++ b/indra/newview/llvosurfacepatch.cpp @@ -936,7 +936,7 @@ void LLVOSurfacePatch::getGeomSizesEast(const S32 stride, const S32 east_stride, } } -BOOL LLVOSurfacePatch::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, S32 *face_hitp, +BOOL LLVOSurfacePatch::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, S32 *face_hitp, LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent) { diff --git a/indra/newview/llvosurfacepatch.h b/indra/newview/llvosurfacepatch.h index 884dbb3be3..3383b16dd9 100755 --- a/indra/newview/llvosurfacepatch.h +++ b/indra/newview/llvosurfacepatch.h @@ -84,7 +84,6 @@ public: /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES BOOL pick_transparent = FALSE, - BOOL pick_rigged = FALSE, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index 4dcc267e96..367fa21b91 100755 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -1110,7 +1110,7 @@ void LLVOTree::updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax) mDrawable->setPositionGroup(pos); } -BOOL LLVOTree::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, S32 *face_hitp, +BOOL LLVOTree::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, S32 *face_hitp, LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent) { diff --git a/indra/newview/llvotree.h b/indra/newview/llvotree.h index c16ed70bb4..c862de8230 100755 --- a/indra/newview/llvotree.h +++ b/indra/newview/llvotree.h @@ -108,7 +108,6 @@ public: /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES BOOL pick_transparent = FALSE, - BOOL pick_rigged = FALSE, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 46e853c1e0..4b0e4514a0 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -3883,7 +3883,7 @@ LLVector3 LLVOVolume::volumeDirectionToAgent(const LLVector3& dir) const } -BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, S32 *face_hitp, +BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, S32 *face_hitp, LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent) { @@ -3902,9 +3902,9 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& if (mDrawable->isState(LLDrawable::RIGGED)) { - if ((pick_rigged) || ((getAvatar()->isSelf()) && (LLFloater::isVisible(gFloaterTools)))) + if (LLFloater::isVisible(gFloaterTools) && getAvatar()->isSelf()) { - updateRiggedVolume(true); + updateRiggedVolume(); volume = mRiggedVolume; transform = false; } @@ -4083,8 +4083,10 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& bool LLVOVolume::treatAsRigged() { - return isSelected() && - isAttachment() && + return LLFloater::isVisible(gFloaterTools) && + isAttachment() && + getAvatar() && + getAvatar()->isSelf() && mDrawable.notNull() && mDrawable->isState(LLDrawable::RIGGED); } @@ -4103,12 +4105,12 @@ void LLVOVolume::clearRiggedVolume() } } -void LLVOVolume::updateRiggedVolume(bool force_update) +void LLVOVolume::updateRiggedVolume() { //Update mRiggedVolume to match current animation frame of avatar. //Also update position/size in octree. - if ((!force_update) && (!treatAsRigged())) + if (!treatAsRigged()) { clearRiggedVolume(); diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index de87c85c89..ff7438ac09 100755 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -140,7 +140,6 @@ public: /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES BOOL pick_transparent = FALSE, - BOOL pick_rigged = FALSE, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point @@ -313,7 +312,7 @@ public: //rigged volume update (for raycasting) - void updateRiggedVolume(bool force_update = false); + void updateRiggedVolume(); LLRiggedVolume* getRiggedVolume(); //returns true if volume should be treated as a rigged volume diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 3c58ce0c09..03712c1065 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7059,7 +7059,7 @@ LLVOPartGroup* LLPipeline::lineSegmentIntersectParticle(const LLVector4a& start, LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_PARTICLE); if (part && hasRenderType(part->mDrawableType)) { - LLDrawable* hit = part->lineSegmentIntersect(start, local_end, TRUE, FALSE, face_hit, &position, NULL, NULL, NULL); + LLDrawable* hit = part->lineSegmentIntersect(start, local_end, TRUE, face_hit, &position, NULL, NULL, NULL); if (hit) { drawable = hit; @@ -7085,8 +7085,7 @@ LLVOPartGroup* LLPipeline::lineSegmentIntersectParticle(const LLVector4a& start, } LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start, const LLVector4a& end, - BOOL pick_transparent, - BOOL pick_rigged, + BOOL pick_transparent, S32* face_hit, LLVector4a* intersection, // return the intersection point LLVector2* tex_coord, // return the texture coordinates of the intersection point @@ -7118,7 +7117,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start, LLSpatialPartition* part = region->getSpatialPartition(j); if (part && hasRenderType(part->mDrawableType)) { - LLDrawable* hit = part->lineSegmentIntersect(start, local_end, pick_transparent, pick_rigged, face_hit, &position, tex_coord, normal, tangent); + LLDrawable* hit = part->lineSegmentIntersect(start, local_end, pick_transparent, face_hit, &position, tex_coord, normal, tangent); if (hit) { drawable = hit; @@ -7175,7 +7174,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start, LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_BRIDGE); if (part && hasRenderType(part->mDrawableType)) { - LLDrawable* hit = part->lineSegmentIntersect(start, local_end, pick_transparent, pick_rigged, face_hit, &position, tex_coord, normal, tangent); + LLDrawable* hit = part->lineSegmentIntersect(start, local_end, pick_transparent, face_hit, &position, tex_coord, normal, tangent); if (hit) { LLVector4a delta; @@ -7263,7 +7262,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInHUD(const LLVector4a& start, c LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_HUD); if (part) { - LLDrawable* hit = part->lineSegmentIntersect(start, end, pick_transparent, FALSE, face_hit, intersection, tex_coord, normal, tangent); + LLDrawable* hit = part->lineSegmentIntersect(start, end, pick_transparent, face_hit, intersection, tex_coord, normal, tangent); if (hit) { drawable = hit; @@ -7710,7 +7709,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) LLVector4a result; result.clear(); - gViewerWindow->cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, FALSE, + gViewerWindow->cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, NULL, &result); diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 97e11a151f..ce2f4b17b1 100755 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -183,7 +183,6 @@ public: //get the object between start and end that's closest to start. LLViewerObject* lineSegmentIntersectInWorld(const LLVector4a& start, const LLVector4a& end, BOOL pick_transparent, - BOOL pick_rigged, S32* face_hit, // return the face hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point -- cgit v1.2.3 From 1d3c59f29c2845ae326830b75f5da5e96ca46139 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 23 Jul 2015 19:15:07 +0300 Subject: MAINT-5398 FIXED [BetaBreakers] TOS additional policy links cannot be scrolled or closed once opened --- indra/llplugin/llpluginclassmedia.cpp | 8 ++++++++ indra/llplugin/llpluginclassmedia.h | 9 +++++++++ indra/newview/llfloatertos.cpp | 6 ++++++ indra/newview/llmediactrl.cpp | 4 ++-- 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index 52626b0302..4bfd0de81e 100755 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -146,6 +146,8 @@ void LLPluginClassMedia::reset() mClickTarget.clear(); mClickUUID.clear(); mStatusCode = 0; + + mClickEnforceTarget = false; // media_time class mCurrentTime = 0.0f; @@ -1358,6 +1360,12 @@ void LLPluginClassMedia::addCertificateFilePath(const std::string& path) sendMessage(message); } +void LLPluginClassMedia::setOverrideClickTarget(const std::string &target) +{ + mClickEnforceTarget = true; + mOverrideClickTarget = target; +} + void LLPluginClassMedia::crashPlugin() { LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_INTERNAL, "crash"); diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h index 5fe8254331..96d577f43c 100755 --- a/indra/llplugin/llpluginclassmedia.h +++ b/indra/llplugin/llpluginclassmedia.h @@ -249,6 +249,13 @@ public: // This is valid during MEDIA_EVENT_CLICK_LINK_HREF and MEDIA_EVENT_GEOMETRY_CHANGE std::string getClickUUID() const { return mClickUUID; }; + // mClickTarget is received from message and governs how link will be opened + // use this to enforce your own way of opening links inside plugins + void setOverrideClickTarget(const std::string &target); + void resetOverrideClickTarget() { mClickEnforceTarget = false; }; + bool isOverrideClickTarget() const { return mClickEnforceTarget; } + std::string getOverrideClickTarget() const { return mOverrideClickTarget; }; + // These are valid during MEDIA_EVENT_DEBUG_MESSAGE std::string getDebugMessageText() const { return mDebugMessageText; }; std::string getDebugMessageLevel() const { return mDebugMessageLevel; }; @@ -404,6 +411,8 @@ protected: std::string mClickNavType; std::string mClickTarget; std::string mClickUUID; + bool mClickEnforceTarget; + std::string mOverrideClickTarget; std::string mDebugMessageText; std::string mDebugMessageLevel; S32 mGeometryX; diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp index c1c21c593e..ae33acb842 100755 --- a/indra/newview/llfloatertos.cpp +++ b/indra/newview/llfloatertos.cpp @@ -141,6 +141,12 @@ BOOL LLFloaterTOS::postBuild() // Don't use the start_url parameter for this browser instance -- it may finish loading before we get to add our observer. // Store the URL separately and navigate here instead. web_browser->navigateTo( getString( "loading_url" ) ); + LLPluginClassMedia* media_plugin = web_browser->getMediaPlugin(); + if (media_plugin) + { + // All links from tos_html should be opened in external browser + media_plugin->setOverrideClickTarget("_external"); + } } return TRUE; diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index cd3d0cdbf2..73faed7ef5 100755 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -983,11 +983,11 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) case MEDIA_EVENT_CLICK_LINK_HREF: { - LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_CLICK_LINK_HREF, target is \"" << self->getClickTarget() << "\", uri is " << self->getClickURL() << LL_ENDL; // retrieve the event parameters std::string url = self->getClickURL(); - std::string target = self->getClickTarget(); + std::string target = self->isOverrideClickTarget() ? self->getOverrideClickTarget() : self->getClickTarget(); std::string uuid = self->getClickUUID(); + LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_CLICK_LINK_HREF, target is \"" << target << "\", uri is " << url << LL_ENDL; LLNotification::Params notify_params; notify_params.name = "PopupAttempt"; -- cgit v1.2.3 From 33dfd860ecd29790b4c43c28f52b185c98ad791d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 27 Jul 2015 18:46:29 +0300 Subject: MAINT-5439 FIXED Gesture will not deactivate by using the deactivate button in inventory drop down menu --- indra/newview/llappearancemgr.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 142a3250c8..a0c3868dc6 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -3821,9 +3821,17 @@ void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove) const LLUUID& id_to_remove = *it; const LLUUID& linked_item_id = gInventory.getLinkedItemID(id_to_remove); LLViewerInventoryItem *item = gInventory.getItem(linked_item_id); - if (item && item->getType() == LLAssetType::AT_OBJECT) + if (item) { - LL_DEBUGS("Avatar") << "ATT removing attachment " << item->getName() << " id " << item->getUUID() << LL_ENDL; + if (item->getType() == LLAssetType::AT_OBJECT) + { + LL_DEBUGS("Avatar") << "ATT removing attachment " << item->getName() << " id " << item->getUUID() << LL_ENDL; + } + if (item->getType() == LLAssetType::AT_GESTURE && LLGestureMgr::instance().isGestureActive(item->getLinkedUUID())) + { + // deactivate gesture before removing link + LLGestureMgr::instance().deactivateGesture(item->getLinkedUUID()); + } } removeCOFItemLinks(linked_item_id, cb); addDoomedTempAttachment(linked_item_id); -- cgit v1.2.3 From e62d5ea4e822e7bb2204eca25c8c4a87a9f6b4be Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Wed, 29 Jul 2015 07:35:08 +0300 Subject: MAINT-5019 FIXED Undesired "http://" added to domains sent in chat Completely removed matching of the URLs w/o a protocol + Some unit tests --- indra/llui/lltextbase.cpp | 2 +- indra/llui/llurlentry.cpp | 40 +--------- indra/llui/llurlentry.h | 13 ---- indra/llui/llurlregistry.cpp | 3 - indra/llui/tests/llurlentry_test.cpp | 140 ++++++++++++++++------------------- 5 files changed, 68 insertions(+), 130 deletions(-) diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 602a703450..ca26c4f72b 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2064,7 +2064,7 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para // output the styled Url appendAndHighlightTextImpl(match.getLabel(), part, link_params, match.underlineOnHoverOnly()); - // show query part of url with gray color only for LLUrlEntryHTTP and LLUrlEntryHTTPNoProtocol url entries + // show query part of url with gray color only for LLUrlEntryHTTP url entries std::string label = match.getQuery(); if (label.size()) { diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 91d655ee9e..a663f8c046 100755 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -287,42 +287,6 @@ std::string LLUrlEntryHTTPLabel::getUrl(const std::string &string) const return getUrlFromWikiLink(string); } -// -// LLUrlEntryHTTPNoProtocol Describes generic Urls like www.google.com -// -LLUrlEntryHTTPNoProtocol::LLUrlEntryHTTPNoProtocol() - : LLUrlEntryBase() -{ - mPattern = boost::regex("\\bwww\\.\\S+\\.([^\\s<]*)?\\b", // i.e. www.FOO.BAR - boost::regex::perl|boost::regex::icase); - mMenuName = "menu_url_http.xml"; - mTooltip = LLTrans::getString("TooltipHttpUrl"); -} - -std::string LLUrlEntryHTTPNoProtocol::getLabel(const std::string &url, const LLUrlLabelCallback &cb) -{ - return urlToLabelWithGreyQuery(url); -} - -std::string LLUrlEntryHTTPNoProtocol::getQuery(const std::string &url) const -{ - return urlToGreyQuery(url); -} - -std::string LLUrlEntryHTTPNoProtocol::getUrl(const std::string &string) const -{ - if (string.find("://") == std::string::npos) - { - return "http://" + escapeUrl(string); - } - return escapeUrl(string); -} - -std::string LLUrlEntryHTTPNoProtocol::getTooltip(const std::string &url) const -{ - return unescapeUrl(url); -} - LLUrlEntryInvalidSLURL::LLUrlEntryInvalidSLURL() : LLUrlEntryBase() { @@ -485,7 +449,7 @@ std::string LLUrlEntrySLURL::getLocation(const std::string &url) const // LLUrlEntrySecondlifeURL::LLUrlEntrySecondlifeURL() { - mPattern = boost::regex("(https?://)?([-\\w\\.]*\\.)?(secondlife|lindenlab)\\.com(:\\d{1,5})?\\/\\S*", + mPattern = boost::regex("https?://([-\\w\\.]*\\.)?(secondlife|lindenlab)\\.com(:\\d{1,5})?\\/\\S*", boost::regex::perl|boost::regex::icase); mIcon = "Hand"; @@ -523,7 +487,7 @@ std::string LLUrlEntrySecondlifeURL::getTooltip(const std::string &url) const // LLUrlEntrySimpleSecondlifeURL::LLUrlEntrySimpleSecondlifeURL() { - mPattern = boost::regex("(https?://)?([-\\w\\.]*\\.)?(secondlife|lindenlab)\\.com(?!\\S)", + mPattern = boost::regex("https?://([-\\w\\.]*\\.)?(secondlife|lindenlab)\\.com(?!\\S)", boost::regex::perl|boost::regex::icase); mIcon = "Hand"; diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h index 4d5e77c3bd..413c20a657 100755 --- a/indra/llui/llurlentry.h +++ b/indra/llui/llurlentry.h @@ -157,19 +157,6 @@ public: /*virtual*/ std::string getUrl(const std::string &string) const; }; -/// -/// LLUrlEntryHTTPNoProtocol Describes generic Urls like www.google.com -/// -class LLUrlEntryHTTPNoProtocol : public LLUrlEntryBase -{ -public: - LLUrlEntryHTTPNoProtocol(); - /*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb); - /*virtual*/ std::string getQuery(const std::string &url) const; - /*virtual*/ std::string getUrl(const std::string &string) const; - /*virtual*/ std::string getTooltip(const std::string &url) const; -}; - class LLUrlEntryInvalidSLURL : public LLUrlEntryBase { public: diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index fcdb5b19d4..decb9c9bc2 100755 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -76,9 +76,6 @@ LLUrlRegistry::LLUrlRegistry() registerUrl(new LLUrlEntrySL()); mUrlEntrySLLabel = new LLUrlEntrySLLabel(); registerUrl(mUrlEntrySLLabel); - // most common pattern is a URL without any protocol starting with "www", - // e.g., "www.secondlife.com" - registerUrl(new LLUrlEntryHTTPNoProtocol()); registerUrl(new LLUrlEntryEmail()); } diff --git a/indra/llui/tests/llurlentry_test.cpp b/indra/llui/tests/llurlentry_test.cpp index a4ab6943b8..96e94c0f80 100755 --- a/indra/llui/tests/llurlentry_test.cpp +++ b/indra/llui/tests/llurlentry_test.cpp @@ -651,79 +651,6 @@ namespace tut template<> template<> void object::test<11>() - { - // - // test LLUrlEntryHTTPNoProtocol - general URLs without a protocol, starting with "www." prefix (MAINT-5019) - // - LLUrlEntryHTTPNoProtocol url; - - testRegex("naked .com URL", url, - "see google.com", - ""); - - testRegex("naked .org URL", url, - "see en.wikipedia.org for details", - ""); - - testRegex("naked .net URL", url, - "example.net", - ""); - - testRegex("naked .edu URL (2 instances), .www prefix", url, - "MIT web site is at web.mit.edu and also www.mit.edu", - "http://www.mit.edu"); - - testRegex("don't match e-mail addresses", url, - "test@lindenlab.com", - ""); - - testRegex("www.test.com URL with path", url, - "see www.test.com/status for grid status", - "http://www.test.com/status"); - - testRegex("www.test.com URL with port", url, - "www.test.com:80", - "http://www.test.com:80"); - - testRegex("www.test.com URL with port and path", url, - "see www.test.com:80/status", - "http://www.test.com:80/status"); - - testRegex("www.*.com URL with port and path", url, - "see www.test.com:80/status", - "http://www.test.com:80/status"); - - testRegex("invalid .com URL [1]", url, - "..com", - ""); - - testRegex("invalid .com URL [2]", url, - "you.come", - ""); - - testRegex("invalid .com URL [3]", url, - "recommended", - ""); - - testRegex("invalid .edu URL", url, - "hi there scheduled maitenance has begun", - ""); - - testRegex("invalid .net URL", url, - "foo.netty", - ""); - - testRegex("XML tags around URL [1]", url, - "www.test.com", - "http://www.test.com"); - - testRegex("XML tags around URL [2]", url, - "www.test.com/status?bar=1", - "http://www.test.com/status?bar=1"); - } - - template<> template<> - void object::test<12>() { // // test LLUrlEntryNoLink - turn off hyperlinking @@ -752,7 +679,7 @@ namespace tut } template<> template<> - void object::test<13>() + void object::test<12>() { // // test LLUrlEntryRegion - secondlife:///app/region/ URLs @@ -862,7 +789,7 @@ namespace tut } template<> template<> - void object::test<14>() + void object::test<13>() { // // test LLUrlEntryemail - general emails @@ -894,4 +821,67 @@ namespace tut "test@ foo.com", ""); } + + template<> template<> + void object::test<14>() + { + // + // test LLUrlEntrySimpleSecondlifeURL - http://*.secondlife.com/* and http://*lindenlab.com/* urls + // + LLUrlEntrySecondlifeURL url; + + testRegex("match urls with protocol", url, + "this url should match http://lindenlab.com/products/second-life", + "http://lindenlab.com/products/second-life"); + + testRegex("match urls with protocol", url, + "search something https://marketplace.secondlife.com/products/search on marketplace and test the https", + "https://marketplace.secondlife.com/products/search"); + + testRegex("match urls with port", url, + "let's specify some port http://secondlife.com:888/status", + "http://secondlife.com:888/status"); + + testRegex("don't match urls w/o protocol", url, + "looks like an url something www.marketplace.secondlife.com/products but no https prefix", + ""); + + testRegex("but with a protocol www is fine", url, + "so let's add a protocol http://www.marketplace.secondlife.com:8888/products", + "http://www.marketplace.secondlife.com:8888/products"); + + testRegex("don't match urls w/o protocol", url, + "and even no www something secondlife.com/status", + ""); + } + + template<> template<> + void object::test<15>() + { + // + // test LLUrlEntrySimpleSecondlifeURL - http://*.secondlife.com and http://*lindenlab.com urls + // + + LLUrlEntrySimpleSecondlifeURL url; + + testRegex("match urls with a protocol", url, + "this url should match http://lindenlab.com", + "http://lindenlab.com"); + + testRegex("match urls with a protocol", url, + "search something https://marketplace.secondlife.com on marketplace and test the https", + "https://marketplace.secondlife.com"); + + testRegex("don't match urls w/o protocol", url, + "looks like an url something www.marketplace.secondlife.com but no https prefix", + ""); + + testRegex("but with a protocol www is fine", url, + "so let's add a protocol http://www.marketplace.secondlife.com", + "http://www.marketplace.secondlife.com"); + + testRegex("don't match urls w/o protocol", url, + "and even no www something lindenlab.com", + ""); + } } -- cgit v1.2.3 From 4495a50e8c0d9a1223160cdd8643a6ce969e3dfb Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 29 Jul 2015 12:00:43 +0300 Subject: MAINT-5376 FIXED Sort experiences by name in the LSL editor experience chooser drop down list --- indra/newview/llpreviewscript.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index f4bcec344c..67832c5994 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -1391,6 +1391,8 @@ void LLLiveLSLEditor::buildExperienceList() else { mExperiences->setEnabled(TRUE); + mExperiences->sortByName(TRUE); + mExperiences->setCurrentByIndex(mExperiences->getCurrentIndex()); getChild("view_profile")->setVisible(TRUE); } } -- cgit v1.2.3 From 07020ffce092d44c0fc376ab33151391e60cad52 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 29 Jul 2015 12:35:54 +0300 Subject: MAINT-5428 FIXED Show tooltip for both parts of url. --- indra/llui/lltextbase.cpp | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index ca26c4f72b..031db31729 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2063,6 +2063,20 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para // output the styled Url appendAndHighlightTextImpl(match.getLabel(), part, link_params, match.underlineOnHoverOnly()); + bool tooltip_required = !match.getTooltip().empty(); + + // set the tooltip for the Url label + if (tooltip_required) + { + segment_set_t::iterator it = getSegIterContaining(getLength()-1); + if (it != mSegments.end()) + { + LLTextSegmentPtr segment = *it; + segment->setToolTip(match.getTooltip()); + } + } + + // show query part of url with gray color only for LLUrlEntryHTTP url entries std::string label = match.getQuery(); @@ -2071,16 +2085,16 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para link_params.color = LLColor4::grey; link_params.readonly_color = LLColor4::grey; appendAndHighlightTextImpl(label, part, link_params, match.underlineOnHoverOnly()); - } - - // set the tooltip for the Url label - if (! match.getTooltip().empty()) - { - segment_set_t::iterator it = getSegIterContaining(getLength()-1); - if (it != mSegments.end()) + + // set the tooltip for the query part of url + if (tooltip_required) { - LLTextSegmentPtr segment = *it; - segment->setToolTip(match.getTooltip()); + segment_set_t::iterator it = getSegIterContaining(getLength()-1); + if (it != mSegments.end()) + { + LLTextSegmentPtr segment = *it; + segment->setToolTip(match.getTooltip()); + } } } -- cgit v1.2.3 From b30dd09e478e93ab9bbc6e6a88f8796e19fc4bdb Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 30 Jul 2015 18:35:33 +0300 Subject: MAINT-5430 Crash LLAssetStorage::downloadCompleteCallback --- indra/llmessage/llassetstorage.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index 8ba2535531..61663e1982 100755 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -633,6 +633,10 @@ void LLAssetStorage::downloadCompleteCallback( vfile.remove(); } } + + // we will be deleting elements of mPendingDownloads which req might be part of, save id and type for reference + LLUUID callback_id = req->getUUID(); + LLAssetType::EType callback_type = req->getType(); // find and callback ALL pending requests for this UUID // SJB: We process the callbacks in reverse order, I do not know if this is important, @@ -660,7 +664,7 @@ void LLAssetStorage::downloadCompleteCallback( { add(sFailedDownloadCount, 1); } - tmp->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getType(), tmp->mUserData, result, ext_status); + tmp->mDownCallback(gAssetStorage->mVFS, callback_id, callback_type, tmp->mUserData, result, ext_status); } delete tmp; } -- cgit v1.2.3 From 287e1bafb286820e3d7d89c59082c72f622a53be Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 30 Jul 2015 19:23:56 +0300 Subject: MAINT-5439 FIXED Gesture will not deactivate by using the deactivate button in inventory drop down menu --- indra/newview/llappearancemgr.cpp | 12 ++---------- indra/newview/llinventorybridge.cpp | 4 ++-- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index a0c3868dc6..142a3250c8 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -3821,17 +3821,9 @@ void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove) const LLUUID& id_to_remove = *it; const LLUUID& linked_item_id = gInventory.getLinkedItemID(id_to_remove); LLViewerInventoryItem *item = gInventory.getItem(linked_item_id); - if (item) + if (item && item->getType() == LLAssetType::AT_OBJECT) { - if (item->getType() == LLAssetType::AT_OBJECT) - { - LL_DEBUGS("Avatar") << "ATT removing attachment " << item->getName() << " id " << item->getUUID() << LL_ENDL; - } - if (item->getType() == LLAssetType::AT_GESTURE && LLGestureMgr::instance().isGestureActive(item->getLinkedUUID())) - { - // deactivate gesture before removing link - LLGestureMgr::instance().deactivateGesture(item->getLinkedUUID()); - } + LL_DEBUGS("Avatar") << "ATT removing attachment " << item->getName() << " id " << item->getUUID() << LL_ENDL; } removeCOFItemLinks(linked_item_id, cb); addDoomedTempAttachment(linked_item_id); diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 63e91f5d88..0671fc2719 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -124,7 +124,7 @@ bool isAddAction(const std::string& action) bool isRemoveAction(const std::string& action) { - return ("take_off" == action || "detach" == action || "deactivate" == action); + return ("take_off" == action || "detach" == action); } bool isMarketplaceCopyAction(const std::string& action) @@ -5119,7 +5119,7 @@ void LLGestureBridge::performAction(LLInventoryModel* model, std::string action) gInventory.updateItem(item); gInventory.notifyObservers(); } - else if (isRemoveAction(action)) + else if ("deactivate" == action || isRemoveAction(action)) { LLGestureMgr::instance().deactivateGesture(mUUID); -- cgit v1.2.3 From d04a3b6d4e67dafa0b6dd8e88b752c5a929de5b0 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 31 Jul 2015 12:27:36 +0300 Subject: MAINT-5127 FIXED Maps URLs copied from gcal inherit special characters that do odd things --- indra/llui/llurlregistry.cpp | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index decb9c9bc2..69eefa736c 100755 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -214,6 +214,7 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL // did we find a match? if so, return its details in the match object if (match_entry) { + // Skip if link is an email with an empty username (starting with @). See MAINT-5371. if (match_start > 0 && text.substr(match_start - 1, 1) == "@") return false; @@ -221,6 +222,32 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL // fill in the LLUrlMatch object and return it std::string url = text.substr(match_start, match_end - match_start + 1); + LLUrlEntryBase *stripped_entry = NULL; + if(LLStringUtil::containsNonprintable(url)) + { + LLStringUtil::stripNonprintable(url); + + std::vector::iterator iter; + for (iter = mUrlEntry.begin(); iter != mUrlEntry.end(); ++iter) + { + LLUrlEntryBase *url_entry = *iter; + U32 start = 0, end = 0; + if (matchRegex(url.c_str(), url_entry->getPattern(), start, end)) + { + if (mLLUrlEntryInvalidSLURL == *iter) + { + if(url_entry && url_entry->isSLURLvalid(url)) + { + continue; + } + } + stripped_entry = url_entry; + break; + } + } + } + + if (match_entry == mUrlEntryTrusted) { LLUriParser up(url); @@ -228,10 +255,12 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL url = up.normalizedUri(); } + std::string url_label = stripped_entry? stripped_entry->getLabel(url, cb) : match_entry->getLabel(url, cb); + std::string url_query = stripped_entry? stripped_entry->getQuery(url) : match_entry->getQuery(url); match.setValues(match_start, match_end, match_entry->getUrl(url), - match_entry->getLabel(url, cb), - match_entry->getQuery(url), + url_label, + url_query, match_entry->getTooltip(url), match_entry->getIcon(url), match_entry->getStyle(), -- cgit v1.2.3 From 43561e558621c98117b5fc5263d5e4e40998173e Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 4 Aug 2015 18:14:50 +0300 Subject: merge conflict fix --- indra/newview/llinventoryfunctions.cpp | 33 ++++++++++++++++----------------- indra/newview/llinventoryfunctions.h | 13 ++++++++----- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 68e0c26449..991c567546 100755 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -959,19 +959,6 @@ void copy_folder_to_outbox(LLInventoryCategory* inv_cat, const LLUUID& dest_fold open_outbox(); } -static void items_removal_confirmation(const LLSD& notification, const LLSD& response, LLHandle root) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if (option == 0 && !root.isDead() && !root.get()->isDead()) - { - LLFolderView* folder_root = root.get(); - //Need to remove item from DND before item is removed from root folder view - //because once removed from root folder view the item is no longer a selected item - LLInventoryAction::removeItemFromDND(folder_root); - folder_root->removeSelectedItems(); - } -} - ///---------------------------------------------------------------------------- // Marketplace functions // @@ -2486,7 +2473,7 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root { LLSD args; args["QUESTION"] = LLTrans::getString(root->getSelectedCount() > 1 ? "DeleteItems" : "DeleteItem"); - LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&items_removal_confirmation, _1, _2, root->getHandle())); + LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&LLInventoryAction::onItemsRemovalConfirmation, _1, _2, root->getHandle())); // Note: marketplace listings will be updated in the callback if delete confirmed return; } @@ -2596,9 +2583,21 @@ void LLInventoryAction::removeItemFromDND(LLFolderView* root) } } - - // Update the marketplace listings that have been affected by the operation - updateMarketplaceFolders(); +void LLInventoryAction::onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, LLHandle root) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option == 0 && !root.isDead() && !root.get()->isDead()) + { + LLFolderView* folder_root = root.get(); + //Need to remove item from DND before item is removed from root folder view + //because once removed from root folder view the item is no longer a selected item + LLInventoryAction::removeItemFromDND(folder_root); + folder_root->removeSelectedItems(); + + // Update the marketplace listings that have been affected by the operation + LLInventoryAction::updateMarketplaceFolders(); + } +} void LLInventoryAction::buildMarketplaceFolders(LLFolderView* root) { diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index f12802912a..e6e8164e35 100755 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -30,6 +30,7 @@ #include "llinventorymodel.h" #include "llinventory.h" +#include "llhandle.h" #include "llwearabletype.h" // compute_stock_count() return error code @@ -444,7 +445,8 @@ public: *******************************************************************************/ class LLFolderViewItem; class LLFolderViewFolder; - +class LLInventoryModel; +class LLFolderView; class LLInventoryState { @@ -456,10 +458,11 @@ public: struct LLInventoryAction { - static void doToSelected(class LLInventoryModel* model, class LLFolderView* root, const std::string& action, BOOL user_confirm = TRUE); - static void callback_doToSelected(const LLSD& notification, const LLSD& response, class LLInventoryModel* model, class LLFolderView* root, const std::string& action); - static void callback_copySelected(const LLSD& notification, const LLSD& response, class LLInventoryModel* model, class LLFolderView* root, const std::string& action); - static void removeItemFromDND(LLFolderView* root); + static void doToSelected(LLInventoryModel* model, LLFolderView* root, const std::string& action, BOOL user_confirm = TRUE); + static void callback_doToSelected(const LLSD& notification, const LLSD& response, class LLInventoryModel* model, class LLFolderView* root, const std::string& action); + static void callback_copySelected(const LLSD& notification, const LLSD& response, class LLInventoryModel* model, class LLFolderView* root, const std::string& action); + static void removeItemFromDND(LLFolderView* root); + static void onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, LLHandle root); private: static void buildMarketplaceFolders(LLFolderView* root); -- cgit v1.2.3 From 1764ac934953b767da7ab727e3f0677e5f7568e9 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 5 Aug 2015 16:00:49 +0300 Subject: MAINT-5348 FIXED Use this screenshot option will be checked by default now. --- indra/newview/llfloaterreporter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 2f4d2a93b2..99a5cf8002 100755 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -35,6 +35,7 @@ #include "llassetstorage.h" #include "llavatarnamecache.h" #include "llcachename.h" +#include "llcheckboxctrl.h" #include "llfontgl.h" #include "llimagej2c.h" #include "llinventory.h" @@ -137,6 +138,7 @@ BOOL LLFloaterReporter::postBuild() mOwnerName = LLStringUtil::null; getChild("summary_edit")->setFocus(TRUE); + getChild("screen_check")->set(TRUE); mDefaultSummary = getChild("details_edit")->getValue().asString(); -- cgit v1.2.3 From ff3e1ae7d6c12574fca820fa4f24ceca1d8158e6 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Tue, 4 Aug 2015 17:51:58 +0300 Subject: MAINT-5343 (Viewer sometimes crashes when updating a local tga texture when RLE or BMP compression is disabled - LLImageTGA::decodeTruecolorNonRle) --- indra/llimage/llimagebmp.cpp | 14 ++++++++++++++ indra/llimage/llimagetga.cpp | 6 ++++++ 2 files changed, 20 insertions(+) diff --git a/indra/llimage/llimagebmp.cpp b/indra/llimage/llimagebmp.cpp index 8573fe0d91..a2ce2fee86 100755 --- a/indra/llimage/llimagebmp.cpp +++ b/indra/llimage/llimagebmp.cpp @@ -443,6 +443,10 @@ BOOL LLImageBMP::decodeColorMask32( U8* dst, U8* src ) mBitfieldMask[2] = 0x000000FF; } + if (getWidth() * getHeight() * 4 > getDataSize() - mBitmapOffset) + { //here we have situation when data size in src less than actually needed + return FALSE; + } S32 src_row_span = getWidth() * 4; S32 alignment_bytes = (3 * src_row_span) % 4; // round up to nearest multiple of 4 @@ -476,6 +480,11 @@ BOOL LLImageBMP::decodeColorTable8( U8* dst, U8* src ) S32 src_row_span = getWidth() * 1; S32 alignment_bytes = (3 * src_row_span) % 4; // round up to nearest multiple of 4 + if ((getWidth() * getHeight()) + getHeight() * alignment_bytes > getDataSize() - mBitmapOffset) + { //here we have situation when data size in src less than actually needed + return FALSE; + } + for( S32 row = 0; row < getHeight(); row++ ) { for( S32 col = 0; col < getWidth(); col++ ) @@ -501,6 +510,11 @@ BOOL LLImageBMP::decodeTruecolor24( U8* dst, U8* src ) S32 src_row_span = getWidth() * 3; S32 alignment_bytes = (3 * src_row_span) % 4; // round up to nearest multiple of 4 + if ((getWidth() * getHeight() * 3) + getHeight() * alignment_bytes > getDataSize() - mBitmapOffset) + { //here we have situation when data size in src less than actually needed + return FALSE; + } + for( S32 row = 0; row < getHeight(); row++ ) { for( S32 col = 0; col < getWidth(); col++ ) diff --git a/indra/llimage/llimagetga.cpp b/indra/llimage/llimagetga.cpp index 4eb8dc7440..d0ae105ba7 100755 --- a/indra/llimage/llimagetga.cpp +++ b/indra/llimage/llimagetga.cpp @@ -437,7 +437,13 @@ BOOL LLImageTGA::decodeTruecolorNonRle( LLImageRaw* raw_image, BOOL &alpha_opaqu // Origin is the bottom left U8* dst = raw_image->getData(); U8* src = getData() + mDataOffset; + S32 pixels = getWidth() * getHeight(); + + if (pixels * (mIs15Bit ? 2 : getComponents()) > getDataSize() - mDataOffset) + { //here we have situation when data size in src less than actually needed + return FALSE; + } if (getComponents() == 4) { -- cgit v1.2.3 From 96e641b32919734d69fb38e33ff6e14c6b475c2d Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 7 Aug 2015 11:47:17 +0300 Subject: MAINT-5451 FIXED A domain name without a top level domain should not be decorated --- indra/llui/llurlentry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index a663f8c046..03b459a30d 100755 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -229,7 +229,7 @@ static std::string getStringAfterToken(const std::string str, const std::string LLUrlEntryHTTP::LLUrlEntryHTTP() : LLUrlEntryBase() { - mPattern = boost::regex("https?://([-\\w\\.]+)+(:\\d+)?(:\\w+)?(@\\d+)?(@\\w+)?/?\\S*", + mPattern = boost::regex("https?://([-\\w\\.]+)+(:\\d+)?(:\\w+)?(@\\d+)?(@\\w+)?\\.[a-z](:\\d+)?(:\\w+)?(@\\d+)?(@\\w+)?/?\\S*", boost::regex::perl|boost::regex::icase); mMenuName = "menu_url_http.xml"; mTooltip = LLTrans::getString("TooltipHttpUrl"); -- cgit v1.2.3 From 4ab4c6da02948521dc1c36ca581bb8e225d4e454 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 10 Aug 2015 11:15:50 +0300 Subject: MAINT-5463 FIXED Add hovertext to the official link badge in chat/IM, etc. --- indra/llui/lltextbase.cpp | 47 ++++++++++++++++++-------- indra/llui/lltextbase.h | 8 +++++ indra/newview/skins/default/xui/en/strings.xml | 1 + 3 files changed, 42 insertions(+), 14 deletions(-) diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 031db31729..bf660849c4 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -37,6 +37,7 @@ #include "lltextparser.h" #include "lltextutil.h" #include "lltooltip.h" +#include "lltrans.h" #include "lluictrl.h" #include "llurlaction.h" #include "llurlregistry.h" @@ -2060,6 +2061,10 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para // add icon before url if need LLTextUtil::processUrlMatch(&match, this, isContentTrusted() || match.isTrusted()); + if ((isContentTrusted() || match.isTrusted()) && !match.getIcon().empty() ) + { + setLastSegmentToolTip(LLTrans::getString("TooltipSLIcon")); + } // output the styled Url appendAndHighlightTextImpl(match.getLabel(), part, link_params, match.underlineOnHoverOnly()); @@ -2068,16 +2073,9 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para // set the tooltip for the Url label if (tooltip_required) { - segment_set_t::iterator it = getSegIterContaining(getLength()-1); - if (it != mSegments.end()) - { - LLTextSegmentPtr segment = *it; - segment->setToolTip(match.getTooltip()); - } + setLastSegmentToolTip(match.getTooltip()); } - - // show query part of url with gray color only for LLUrlEntryHTTP url entries std::string label = match.getQuery(); if (label.size()) @@ -2089,12 +2087,7 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para // set the tooltip for the query part of url if (tooltip_required) { - segment_set_t::iterator it = getSegIterContaining(getLength()-1); - if (it != mSegments.end()) - { - LLTextSegmentPtr segment = *it; - segment->setToolTip(match.getTooltip()); - } + setLastSegmentToolTip(match.getTooltip()); } } @@ -2121,6 +2114,16 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para } } +void LLTextBase::setLastSegmentToolTip(const std::string &tooltip) +{ + segment_set_t::iterator it = getSegIterContaining(getLength()-1); + if (it != mSegments.end()) + { + LLTextSegmentPtr segment = *it; + segment->setToolTip(tooltip); + } +} + static LLTrace::BlockTimerStatHandle FTM_APPEND_TEXT("Append Text"); void LLTextBase::appendText(const std::string &new_text, bool prepend_newline, const LLStyle::Params& input_params) @@ -3571,6 +3574,22 @@ S32 LLImageTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin return 0; } +BOOL LLImageTextSegment::handleToolTip(S32 x, S32 y, MASK mask) +{ + if (!mTooltip.empty()) + { + LLToolTipMgr::instance().show(mTooltip); + return TRUE; + } + + return FALSE; +} + +void LLImageTextSegment::setToolTip(const std::string& tooltip) +{ + mTooltip = tooltip; +} + F32 LLImageTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect) { if ( (start >= 0) && (end <= mEnd - mStart)) diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index dfc10923f3..87809aa8fb 100755 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -241,9 +241,15 @@ public: S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const; F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect); + /*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask); + /*virtual*/ void setToolTip(const std::string& tooltip); + private: class LLTextBase& mEditor; LLStyleConstSP mStyle; + +protected: + std::string mTooltip; }; typedef LLPointer LLTextSegmentPtr; @@ -392,6 +398,8 @@ public: const std::string& getLabel() { return mLabel.getString(); } const LLWString& getWlabel() { return mLabel.getWString();} + void setLastSegmentToolTip(const std::string &tooltip); + /** * If label is set, draws text label (which is LLLabelTextSegment) * that is visible when no user text provided diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 32bd82baff..4eb6e2462d 100755 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -238,6 +238,7 @@ Please try logging in again in a minute. Only a single item can be dragged here You can't wear a folder containing more than [AMOUNT] items. You can change this limit in Advanced > Show Debug Settings > WearFolderLimit. + This links to a page on the official SecondLife.com or LindenLab.com domain. You can't rez items from the Marketplace Listings folder You can't put items you are wearing in the Marketplace Listings folder -- cgit v1.2.3 From 7172b76f0e70bcb1c4616f7126c279637e18c675 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 12 Aug 2015 12:09:57 +0300 Subject: SL-193 FIXED Show info icons for experiences in Key,Allowed,Blocked lists. --- indra/newview/llnamelistctrl.cpp | 15 ++++++++++++--- indra/newview/llnamelistctrl.h | 17 +++++++++++++---- indra/newview/llpanelexperiencelisteditor.cpp | 6 ++++-- indra/newview/llpanelexperiencelisteditor.h | 3 ++- .../default/xui/en/panel_experience_list_editor.xml | 6 +++--- 5 files changed, 34 insertions(+), 13 deletions(-) diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index 79988a0800..5510598ae7 100755 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -130,8 +130,14 @@ BOOL LLNameListCtrl::handleDragAndDrop( return handled; } -void LLNameListCtrl::showInspector(const LLUUID& avatar_id, bool is_group) +void LLNameListCtrl::showInspector(const LLUUID& avatar_id, bool is_group, bool is_experience) { + if(is_experience) + { + LLFloaterReg::showInstance("experience_profile", avatar_id, true); + return; + } + if (is_group) LLFloaterReg::showInstance("inspect_group", LLSD().with("group_id", avatar_id)); else @@ -230,10 +236,11 @@ BOOL LLNameListCtrl::handleToolTip(S32 x, S32 y, MASK mask) // Should we show a group or an avatar inspector? bool is_group = hit_item->isGroup(); + bool is_experience = hit_item->isExperience(); LLToolTip::Params params; params.background_visible( false ); - params.click_callback( boost::bind(&LLNameListCtrl::showInspector, this, avatar_id, is_group) ); + params.click_callback( boost::bind(&LLNameListCtrl::showInspector, this, avatar_id, is_group, is_experience) ); params.delay_time(0.0f); // spawn instantly on hover params.image( icon ); params.message(""); @@ -295,7 +302,7 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow( const std::string& prefix) { LLUUID id = name_item.value().asUUID(); - LLNameListItem* item = new LLNameListItem(name_item,name_item.target() == GROUP); + LLNameListItem* item = new LLNameListItem(name_item,name_item.target() == GROUP, name_item.target() == EXPERIENCE); if (!item) return NULL; @@ -353,6 +360,8 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow( } break; } + case EXPERIENCE: + // just use supplied name default: break; } diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h index 515962df7d..19ce3c7aed 100755 --- a/indra/newview/llnamelistctrl.h +++ b/indra/newview/llnamelistctrl.h @@ -44,22 +44,30 @@ class LLNameListItem : public LLScrollListItem, public LLHandleProvider item); private: diff --git a/indra/newview/llpanelexperiencelisteditor.cpp b/indra/newview/llpanelexperiencelisteditor.cpp index fc4ee9862e..7c07301762 100644 --- a/indra/newview/llpanelexperiencelisteditor.cpp +++ b/indra/newview/llpanelexperiencelisteditor.cpp @@ -33,6 +33,7 @@ #include "llfloaterexperiencepicker.h" #include "llfloaterreg.h" #include "llhandle.h" +#include "llnamelistctrl.h" #include "llscrolllistctrl.h" #include "llviewerregion.h" #include "llagent.h" @@ -54,7 +55,7 @@ LLPanelExperienceListEditor::LLPanelExperienceListEditor() BOOL LLPanelExperienceListEditor::postBuild() { - mItems = getChild("experience_list"); + mItems = getChild("experience_list"); mAdd = getChild("btn_add"); mRemove = getChild("btn_remove"); mProfile = getChild("btn_profile"); @@ -178,12 +179,13 @@ void LLPanelExperienceListEditor::onItems() { const LLUUID& experience = *it; item["id"]=experience; + item["target"] = LLNameListCtrl::EXPERIENCE; LLSD& columns = item["columns"]; columns[0]["column"] = "experience_name"; columns[0]["value"] = getString("loading"); mItems->addElement(item); - LLExperienceCache::get(experience, boost::bind(&LLPanelExperienceListEditor::experienceDetailsCallback, + LLExperienceCache::get(experience, boost::bind(&LLPanelExperienceListEditor::experienceDetailsCallback, getDerivedHandle(), _1)); } diff --git a/indra/newview/llpanelexperiencelisteditor.h b/indra/newview/llpanelexperiencelisteditor.h index f69f0509be..bc9867752d 100644 --- a/indra/newview/llpanelexperiencelisteditor.h +++ b/indra/newview/llpanelexperiencelisteditor.h @@ -31,6 +31,7 @@ #include "lluuid.h" #include +class LLNameListCtrl; class LLScrollListCtrl; class LLButton; class LLFloaterExperiencePicker; @@ -82,7 +83,7 @@ private: uuid_list_t mExperienceIds; - LLScrollListCtrl* mItems; + LLNameListCtrl* mItems; filter_list mFilters; LLButton* mAdd; LLButton* mRemove; diff --git a/indra/newview/skins/default/xui/en/panel_experience_list_editor.xml b/indra/newview/skins/default/xui/en/panel_experience_list_editor.xml index c76b958eda..c357f9e7d5 100644 --- a/indra/newview/skins/default/xui/en/panel_experience_list_editor.xml +++ b/indra/newview/skins/default/xui/en/panel_experience_list_editor.xml @@ -47,19 +47,19 @@ height="12" follows="top|left"> - - - +