From faefd351638b80a0e0bd2383303acd2a50c7b297 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Mon, 29 Apr 2024 00:04:24 +0200 Subject: secondlife/viewer#1330 EmojiPicker inserts emoji to inactive chat floater --- indra/llui/llmenugl.cpp | 2 ++ indra/llui/llmodaldialog.cpp | 26 ++++++++++++++++---------- indra/newview/lltoast.cpp | 2 +- 3 files changed, 19 insertions(+), 11 deletions(-) (limited to 'indra') diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 7381dc80a8..ff1a25aef7 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -46,6 +46,7 @@ #include "llfocusmgr.h" #include "llcoord.h" #include "llwindow.h" +#include "llemojihelper.h" #include "llcriticaldamp.h" #include "lluictrlfactory.h" @@ -1411,6 +1412,7 @@ void LLMenuItemBranchDownGL::openMenu( void ) } else { + LLEmojiHelper::instance().hideHelper(nullptr, true); if (branch->getTornOff()) { LLFloater * branch_parent = dynamic_cast(branch->getParent()); diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp index 3e5978eb59..50e7a195cf 100644 --- a/indra/llui/llmodaldialog.cpp +++ b/indra/llui/llmodaldialog.cpp @@ -28,6 +28,7 @@ #include "llmodaldialog.h" +#include "llemojihelper.h" #include "llfocusmgr.h" #include "v4color.h" #include "v2math.h" @@ -35,19 +36,20 @@ #include "llwindow.h" #include "llkeyboard.h" #include "llmenugl.h" + // static std::list LLModalDialog::sModalStack; -LLModalDialog::LLModalDialog( const LLSD& key, BOOL modal ) +LLModalDialog::LLModalDialog(const LLSD& key, BOOL modal) : LLFloater(key), - mModal( modal ) + mModal(modal) { if (modal) { setCanMinimize(FALSE); setCanClose(FALSE); } - setVisible( FALSE ); + setVisible(FALSE); setBackgroundVisible(TRUE); setBackgroundOpaque(TRUE); centerOnScreen(); // default position @@ -96,7 +98,7 @@ void LLModalDialog::onOpen(const LLSD& key) { if (mModal) { - // If Modal, Hide the active modal dialog + // If Modal, hide the active modal dialog if (!sModalStack.empty()) { LLModalDialog* front = sModalStack.front(); @@ -146,13 +148,18 @@ void LLModalDialog::stopModal() } } - void LLModalDialog::setVisible( BOOL visible ) { if (mModal) { - if( visible ) + if (visible) { + // Hide all menus currently shown + LLMenuGL::sMenuContainer->hideMenus(); + + // Hide EmojiPicker if it is shown + LLEmojiHelper::instance().hideHelper(nullptr, true); + // This is a modal dialog. It sucks up all mouse and keyboard operations. gFocusMgr.setMouseCapture( this ); @@ -255,7 +262,6 @@ BOOL LLModalDialog::handleRightMouseDown(S32 x, S32 y, MASK mask) return TRUE; } - BOOL LLModalDialog::handleKeyHere(KEY key, MASK mask ) { LLFloater::handleKeyHere(key, mask ); @@ -300,8 +306,7 @@ void LLModalDialog::centerOnScreen() centerWithin(LLRect(0, 0, ll_round(window_size.mV[VX]), ll_round(window_size.mV[VY]))); } - -// static +// static void LLModalDialog::onAppFocusLost() { if( !sModalStack.empty() ) @@ -316,7 +321,7 @@ void LLModalDialog::onAppFocusLost() } } -// static +// static void LLModalDialog::onAppFocusGained() { if( !sModalStack.empty() ) @@ -332,6 +337,7 @@ void LLModalDialog::onAppFocusGained() } } +// static void LLModalDialog::shutdownModals() { // This method is only for use during app shutdown. ~LLModalDialog() diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 223aaad811..b99d025346 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -421,7 +421,7 @@ void LLToast::setVisible(BOOL show) if(mHideBtn) mHideBtn->setVisible(show); } - LLFloater::setVisible(show); + LLModalDialog::setVisible(show); if (mPanel && !mPanel->isDead() && mWrapperPanel -- cgit v1.2.3 From d738aa7d640ab36eca56a6b9b07bea013d54c769 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Thu, 2 May 2024 18:36:29 +0300 Subject: pviewer#235 slurl command should require at least click action --- indra/newview/llvoicecallhandler.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llvoicecallhandler.cpp b/indra/newview/llvoicecallhandler.cpp index 95e11abd82..85e829021e 100644 --- a/indra/newview/llvoicecallhandler.cpp +++ b/indra/newview/llvoicecallhandler.cpp @@ -37,7 +37,12 @@ public: LLVoiceCallAvatarHandler() : LLCommandHandler("voicecallavatar", UNTRUSTED_THROTTLE) { } - + + virtual bool canHandleUntrusted(const LLSD ¶ms, const LLSD &query_map, LLMediaCtrl *web, const std::string &nav_type) + { + return (nav_type == NAV_TYPE_CLICKED || nav_type == NAV_TYPE_EXTERNAL); + } + bool handle(const LLSD& params, const LLSD& query_map, const std::string& grid, LLMediaCtrl* web) { if (!LLUI::getInstance()->mSettingGroups["config"]->getBOOL("EnableVoiceCall")) -- cgit v1.2.3 From 26f70456d1e9059c48d25e08fc07f893315b1f3c Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 7 May 2024 00:48:04 +0300 Subject: viewer#1195 Don't allow Bake textures as group images --- indra/newview/llpanelgroupcreate.cpp | 1 + indra/newview/llpanelgroupgeneral.cpp | 1 + 2 files changed, 2 insertions(+) (limited to 'indra') diff --git a/indra/newview/llpanelgroupcreate.cpp b/indra/newview/llpanelgroupcreate.cpp index 01a4ab0455..913db0e198 100644 --- a/indra/newview/llpanelgroupcreate.cpp +++ b/indra/newview/llpanelgroupcreate.cpp @@ -85,6 +85,7 @@ BOOL LLPanelGroupCreate::postBuild() mInsignia = getChild("insignia", TRUE); mInsignia->setAllowLocalTexture(FALSE); + mInsignia->setBakeTextureEnabled(FALSE); mInsignia->setCanApplyImmediately(FALSE); return TRUE; diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index 04d3236bf1..6aecef8d68 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -197,6 +197,7 @@ void LLPanelGroupGeneral::setupCtrls(LLPanel* panel_group) { mInsignia->setCommitCallback(onCommitAny, this); mInsignia->setAllowLocalTexture(FALSE); + mInsignia->setBakeTextureEnabled(FALSE); } mFounderName = getChild("founder_name"); -- cgit v1.2.3 From 363b89947c580e1056cb5f4ae32ebfd9eaf12a17 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Wed, 15 May 2024 13:43:59 +0300 Subject: Mac build fix --- indra/newview/tests/llviewerassetstats_test.cpp | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'indra') diff --git a/indra/newview/tests/llviewerassetstats_test.cpp b/indra/newview/tests/llviewerassetstats_test.cpp index 278de5f31c..8dfba05d15 100644 --- a/indra/newview/tests/llviewerassetstats_test.cpp +++ b/indra/newview/tests/llviewerassetstats_test.cpp @@ -43,23 +43,6 @@ namespace LLStatViewer LLTrace::SampleStatHandle<> FPS_SAMPLE("fpssample"); } -void LLVOAvatar::getNearbyRezzedStats(std::vector& counts) -{ - counts.resize(3); - counts[0] = 0; - counts[1] = 0; - counts[2] = 1; -} - -// static -std::string LLVOAvatar::rezStatusToString(S32 rez_status) -{ - if (rez_status==0) return "cloud"; - if (rez_status==1) return "gray"; - if (rez_status==2) return "textured"; - return "unknown"; -} - // static LLViewerStats::StatsAccumulator& LLViewerStats::PhaseMap::getPhaseStats(const std::string& phase_name) { -- cgit v1.2.3 From 2f600d8ad641012052dce3452b815b412d2d7b58 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Thu, 16 May 2024 13:17:19 +0200 Subject: secondlife/jira-archive-internal#71144 Mouselook no longer allows pitch upwards to full 90 degrees --- indra/newview/llagent.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index af6ccb7850..c3643dcc62 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1497,6 +1497,11 @@ void LLAgent::pitch(F32 angle) check_viewer_camera = true; } } + else if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) + { + min_angle = 0.1; + max_angle = 179.9; + } if ((angle < 0 && agent_camera_angle_from_skyward < min_angle) || (angle > 0 && agent_camera_angle_from_skyward > max_angle)) -- cgit v1.2.3 From 741b79d63b97bb5e43f758fd93854317f0bdc65f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 21 May 2024 21:12:41 +0300 Subject: viewer#1529 Mesh Uploader should permit lowering material count --- indra/newview/llfloatermodelpreview.cpp | 8 +++++++- indra/newview/llmodelpreview.cpp | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 0ef7353eac..66f89d88d3 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1765,9 +1765,15 @@ void LLFloaterModelPreview::onLoDSourceCommit(S32 lod) if (index == LLModelPreview::MESH_OPTIMIZER_AUTO || index == LLModelPreview::MESH_OPTIMIZER_SLOPPY || index == LLModelPreview::MESH_OPTIMIZER_PRECISE) - { //rebuild LoD to update triangle counts + { + // rebuild LoD to update triangle counts onLODParamCommit(lod, true); } + if (index == LLModelPreview::USE_LOD_ABOVE) + { + // refresh to pick triangle counts + mModelPreview->mDirty = true; + } } void LLFloaterModelPreview::resetDisplayOptions() diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index 736971276e..ac41558721 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -2285,7 +2285,7 @@ void LLModelPreview::updateStatusMessages() if (lod != lod_high) { - if (total_submeshes[lod] && total_submeshes[lod] != total_submeshes[lod_high]) + if (total_submeshes[lod] && total_submeshes[lod] > total_submeshes[lod_high]) { //number of submeshes is different message = "mesh_status_submesh_mismatch"; upload_status[lod] = 2; -- cgit v1.2.3 From c255174c561fcafcd114a787a9156e05347563d1 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 21 May 2024 17:07:36 +0300 Subject: viewer#1400 Show LODs info in Build Tools --- indra/newview/llfloaterobjectweights.cpp | 96 +++++++++++++++++- indra/newview/llfloaterobjectweights.h | 19 ++-- .../default/xui/en/floater_object_weights.xml | 110 ++++++++++++++++++++- 3 files changed, 217 insertions(+), 8 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterobjectweights.cpp b/indra/newview/llfloaterobjectweights.cpp index 090b0657d1..8e102ab3b2 100644 --- a/indra/newview/llfloaterobjectweights.cpp +++ b/indra/newview/llfloaterobjectweights.cpp @@ -36,6 +36,14 @@ #include "llviewerparcelmgr.h" #include "llviewerregion.h" +static const std::string lod_strings[4] = +{ + "lowest_lod", + "low_lod", + "medium_lod", + "high_lod", +}; + // virtual bool LLCrossParcelFunctor::apply(LLViewerObject* obj) { @@ -75,7 +83,10 @@ LLFloaterObjectWeights::LLFloaterObjectWeights(const LLSD& key) mSelectedOnLand(NULL), mRezzedOnLand(NULL), mRemainingCapacity(NULL), - mTotalCapacity(NULL) + mTotalCapacity(NULL), + mLodLevel(nullptr), + mTrianglesShown(nullptr), + mPixelArea(nullptr) { } @@ -99,6 +110,10 @@ BOOL LLFloaterObjectWeights::postBuild() mRemainingCapacity = getChild("remaining_capacity"); mTotalCapacity = getChild("total_capacity"); + mLodLevel = getChild("lod_level"); + mTrianglesShown = getChild("triangles_shown"); + mPixelArea = getChild("pixel_area"); + return TRUE; } @@ -135,6 +150,69 @@ void LLFloaterObjectWeights::setErrorStatus(S32 status, const std::string& reaso toggleWeightsLoadingIndicators(false); } +void LLFloaterObjectWeights::draw() +{ + // Normally it's a bad idea to set text and visibility inside draw + // since it can cause rect updates go to different, already drawn elements, + // but floater is very simple and these elements are supposed to be isolated + LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); + if (selection->isEmpty()) + { + const std::string text = getString("nothing_selected"); + mLodLevel->setText(text); + mTrianglesShown->setText(text); + mPixelArea->setText(text); + + toggleRenderLoadingIndicators(false); + } + else + { + S32 object_lod = -1; + bool multiple_lods = false; + S32 total_tris = 0; + S32 pixel_area = 0; + for (LLObjectSelection::valid_root_iterator iter = selection->valid_root_begin(); + iter != selection->valid_root_end(); ++iter) + { + LLViewerObject* object = (*iter)->getObject(); + S32 lod = object->getLOD(); + if (object_lod < 0) + { + object_lod = lod; + } + else if (object_lod != lod) + { + multiple_lods = true; + } + + if (object->isRootEdit()) + { + total_tris += object->recursiveGetTriangleCount(); + pixel_area += object->getPixelArea(); + } + } + + if (multiple_lods) + { + mLodLevel->setText(getString("multiple_lods")); + toggleRenderLoadingIndicators(false); + } + else if (object_lod < 0) + { + // nodes are waiting for data + toggleRenderLoadingIndicators(true); + } + else + { + mLodLevel->setText(getString(lod_strings[object_lod])); + toggleRenderLoadingIndicators(false); + } + mTrianglesShown->setText(llformat("%d", total_tris)); + mPixelArea->setText(llformat("%d", pixel_area)); + } + LLFloater::draw(); +} + void LLFloaterObjectWeights::updateLandImpacts(const LLParcel* parcel) { if (!parcel || LLSelectMgr::getInstance()->getSelection()->isEmpty()) @@ -252,6 +330,17 @@ void LLFloaterObjectWeights::toggleLandImpactsLoadingIndicators(bool visible) mTotalCapacity->setVisible(!visible); } +void LLFloaterObjectWeights::toggleRenderLoadingIndicators(bool visible) +{ + childSetVisible("lod_level_loading_indicator", visible); + childSetVisible("triangles_shown_loading_indicator", visible); + childSetVisible("pixel_area_loading_indicator", visible); + + mLodLevel->setVisible(!visible); + mTrianglesShown->setVisible(!visible); + mPixelArea->setVisible(!visible); +} + void LLFloaterObjectWeights::updateIfNothingSelected() { const std::string text = getString("nothing_selected"); @@ -269,6 +358,11 @@ void LLFloaterObjectWeights::updateIfNothingSelected() mRemainingCapacity->setText(text); mTotalCapacity->setText(text); + mLodLevel->setText(text); + mTrianglesShown->setText(text); + mPixelArea->setText(text); + toggleWeightsLoadingIndicators(false); toggleLandImpactsLoadingIndicators(false); + toggleRenderLoadingIndicators(false); } diff --git a/indra/newview/llfloaterobjectweights.h b/indra/newview/llfloaterobjectweights.h index 10e790f5aa..5d67a12f13 100644 --- a/indra/newview/llfloaterobjectweights.h +++ b/indra/newview/llfloaterobjectweights.h @@ -58,21 +58,24 @@ public: LLFloaterObjectWeights(const LLSD& key); ~LLFloaterObjectWeights(); - /*virtual*/ BOOL postBuild(); + BOOL postBuild() override; - /*virtual*/ void onOpen(const LLSD& key); + void onOpen(const LLSD& key) override; - /*virtual*/ void onWeightsUpdate(const SelectionCost& selection_cost); - /*virtual*/ void setErrorStatus(S32 status, const std::string& reason); + void onWeightsUpdate(const SelectionCost& selection_cost) override; + void setErrorStatus(S32 status, const std::string& reason) override; + + void draw() override; void updateLandImpacts(const LLParcel* parcel); - void refresh(); + void refresh() override; private: - /*virtual*/ void generateTransactionID(); + void generateTransactionID() override; void toggleWeightsLoadingIndicators(bool visible); void toggleLandImpactsLoadingIndicators(bool visible); + void toggleRenderLoadingIndicators(bool visible); void updateIfNothingSelected(); @@ -88,6 +91,10 @@ private: LLTextBox *mRezzedOnLand; LLTextBox *mRemainingCapacity; LLTextBox *mTotalCapacity; + + LLTextBox *mLodLevel; + LLTextBox *mTrianglesShown; + LLTextBox *mPixelArea; }; #endif //LL_LLFLOATEROBJECTWEIGHTS_H diff --git a/indra/newview/skins/default/xui/en/floater_object_weights.xml b/indra/newview/skins/default/xui/en/floater_object_weights.xml index 5e4b017590..709fbdd27e 100644 --- a/indra/newview/skins/default/xui/en/floater_object_weights.xml +++ b/indra/newview/skins/default/xui/en/floater_object_weights.xml @@ -2,7 +2,7 @@ + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From b052240a500707fc0e34ef6f23a02af39fdfc500 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 22 May 2024 12:33:36 +0300 Subject: viewer#1400 Allow forcing specific LODs for selection --- indra/newview/app_settings/settings.xml | 11 ++++ indra/newview/llselectmgr.cpp | 18 ++++++ indra/newview/llselectmgr.h | 1 + indra/newview/llviewermenu.cpp | 64 ++++++++++++++++++++++ indra/newview/llvovolume.cpp | 5 ++ indra/newview/skins/default/xui/en/menu_viewer.xml | 60 +++++++++++++++++++- 6 files changed, 158 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 60e6a89371..667953ab54 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1830,6 +1830,17 @@ Value 0 + DebugSelectionLODs + + Comment + Force selection to show specific LOD, -1 for off, 0 - lowest, 4 - high. + Persist + 0 + Type + S32 + Value + -1 + AnimatedObjectsAllowLeftClick Comment diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 885f4d993e..cbc52aeec6 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -250,6 +250,23 @@ LLSelectMgr::LLSelectMgr() mForceSelection = FALSE; mShowSelection = FALSE; + + LLControlVariable* ctrl = gSavedSettings.getControl("DebugSelectionLODs").get(); + if (ctrl) + { + mSlectionLodModChangedConnection = ctrl->getSignal()->connect([this](LLControlVariable*, const LLSD&, const LLSD&) + { + for (LLObjectSelection::iterator iter = mSelectedObjects->begin(); + iter != mSelectedObjects->end(); ++iter) + { + LLViewerObject* object = (*iter)->getObject(); + if (object) + { + object->updateLOD(); + } + } + }); + } } @@ -259,6 +276,7 @@ LLSelectMgr::LLSelectMgr() LLSelectMgr::~LLSelectMgr() { clearSelections(); + mSlectionLodModChangedConnection.disconnect(); } void LLSelectMgr::clearSelections() diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 1ce53fe149..e3ecdf1013 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -932,6 +932,7 @@ private: BOOL mForceSelection; std::vector mPauseRequests; + boost::signals2::connection mSlectionLodModChangedConnection; }; // *DEPRECATED: For callbacks or observers, use diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index ad2675a786..39cd72c6b2 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5510,6 +5510,38 @@ class LLToolsEnablePathfindingRebakeRegion : public view_listener_t } }; +class LLToolsCheckSelectionLODMode : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + std::string param = userdata.asString(); + static LLCachedControl debug_selection_lods(gSavedSettings, "DebugSelectionLODs", 0); + if ("default" == param) + { + return debug_selection_lods() < 0; + } + else if ("high" == param) + { + return debug_selection_lods() == 3; + } + else if ("medium" == param) + { + return debug_selection_lods() == 2; + } + else if ("low" == param) + { + return debug_selection_lods() == 1; + } + else if ("lowest" == param) + { + return debug_selection_lods() == 0; + } + + return false; + } +}; + + // Round the position of all root objects to the grid class LLToolsSnapObjectXY : public view_listener_t { @@ -8319,6 +8351,36 @@ class LLToolsSelectBySurrounding : public view_listener_t } }; +class LLToolsSelectionLODMode : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + std::string param = userdata.asString(); + if ("default" == param) + { + gSavedSettings.setS32("DebugSelectionLODs", -1); + } + else if ("high" == param) + { + gSavedSettings.setS32("DebugSelectionLODs", 3); + } + else if ("medium" == param) + { + gSavedSettings.setS32("DebugSelectionLODs", 2); + } + else if ("low" == param) + { + gSavedSettings.setS32("DebugSelectionLODs", 1); + } + else if ("lowest" == param) + { + gSavedSettings.setS32("DebugSelectionLODs", 0); + } + + return true; + } +}; + class LLToolsShowHiddenSelection : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -9563,6 +9625,7 @@ void initialize_menus() view_listener_t::addMenu(new LLToolsSelectInvisibleObjects(), "Tools.SelectInvisibleObjects"); view_listener_t::addMenu(new LLToolsSelectReflectionProbes(), "Tools.SelectReflectionProbes"); view_listener_t::addMenu(new LLToolsSelectBySurrounding(), "Tools.SelectBySurrounding"); + view_listener_t::addMenu(new LLToolsSelectionLODMode(), "Tools.SelectionLODMode"); view_listener_t::addMenu(new LLToolsShowHiddenSelection(), "Tools.ShowHiddenSelection"); view_listener_t::addMenu(new LLToolsShowSelectionLightRadius(), "Tools.ShowSelectionLightRadius"); view_listener_t::addMenu(new LLToolsEditLinkedParts(), "Tools.EditLinkedParts"); @@ -9594,6 +9657,7 @@ void initialize_menus() view_listener_t::addMenu(new LLToolsEnablePathfindingView(), "Tools.EnablePathfindingView"); view_listener_t::addMenu(new LLToolsDoPathfindingRebakeRegion(), "Tools.DoPathfindingRebakeRegion"); view_listener_t::addMenu(new LLToolsEnablePathfindingRebakeRegion(), "Tools.EnablePathfindingRebakeRegion"); + view_listener_t::addMenu(new LLToolsCheckSelectionLODMode(), "Tools.ToolsCheckSelectionLODMode"); // Help menu // most items use the ShowFloater method diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 316e0206d3..b4ea06f8b7 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1503,11 +1503,16 @@ BOOL LLVOVolume::calcLOD() mLODAdjustedDistance = distance; + static LLCachedControl debug_selection_lods(gSavedSettings, "DebugSelectionLODs", 0); if (isHUDAttachment()) { // HUDs always show at highest detail cur_detail = 3; } + else if (isSelected() && debug_selection_lods() >= 0) + { + cur_detail = llmin(debug_selection_lods(), 3); + } else { cur_detail = computeLODDetail(ll_round(distance, 0.01f), ll_round(radius, 0.01f), lod_factor); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 5b0ebf1110..6e92d91320 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1598,7 +1598,65 @@ function="World.EnvPreset" function="ToggleControl" parameter="RenderDisablePostProcessing" /> - + + + + + + + + + + + + + + + + + + + + + + + + + Date: Thu, 23 May 2024 15:55:45 +0300 Subject: viewer-private#240 Restore missing marketplace notification --- indra/llui/llfolderviewitem.cpp | 14 ++++++++++---- indra/llui/llfolderviewitem.h | 4 ++-- .../xui/en/panel_marketplace_listings_inventory.xml | 2 +- .../default/xui/en/panel_marketplace_listings_listed.xml | 2 +- .../xui/en/panel_marketplace_listings_unassociated.xml | 2 +- .../default/xui/en/panel_marketplace_listings_unlisted.xml | 2 +- 6 files changed, 16 insertions(+), 10 deletions(-) (limited to 'indra') diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index a9e1171444..a905e9b59b 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -31,11 +31,12 @@ #include "llfolderviewitem.h" #include "llfolderview.h" #include "llfolderviewmodel.h" -#include "llpanel.h" #include "llcallbacklist.h" #include "llcriticaldamp.h" #include "llclipboard.h" #include "llfocusmgr.h" // gFocusMgr +#include "llnotificationsutil.h" +#include "llpanel.h" #include "lltrans.h" #include "llwindow.h" @@ -105,7 +106,7 @@ LLFolderViewItem::Params::Params() item_height("item_height"), item_top_pad("item_top_pad"), creation_date(), - allow_wear("allow_wear", true), + marketplace_item("marketplace_item", false), allow_drop("allow_drop", true), font_color("font_color"), font_highlight_color("font_highlight_color"), @@ -144,7 +145,7 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p) mRoot(p.root), mViewModelItem(p.listener), mIsMouseOverTitle(false), - mAllowWear(p.allow_wear), + mMarketplaceItem(p.marketplace_item), mAllowDrop(p.allow_drop), mFontColor(p.font_color), mFontHighlightColor(p.font_highlight_color), @@ -533,10 +534,15 @@ void LLFolderViewItem::buildContextMenu(LLMenuGL& menu, U32 flags) void LLFolderViewItem::openItem( void ) { - if (mAllowWear || !getViewModelItem()->isItemWearable()) + if (!mMarketplaceItem || !getViewModelItem()->isItemWearable()) { getViewModelItem()->openItem(); } + else if (mMarketplaceItem) + { + // Wearing an object from any listing, active or not, is verbotten + LLNotificationsUtil::add("AlertMerchantListingCannotWear"); + } } void LLFolderViewItem::rename(const std::string& new_name) diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h index 351613e387..275fd52c00 100644 --- a/indra/llui/llfolderviewitem.h +++ b/indra/llui/llfolderviewitem.h @@ -59,7 +59,7 @@ public: item_top_pad; Optional creation_date; - Optional allow_wear; + Optional marketplace_item; Optional allow_drop; Optional font_color; @@ -121,7 +121,7 @@ protected: mIsCurSelection, mDragAndDropTarget, mIsMouseOverTitle, - mAllowWear, + mMarketplaceItem, mAllowDrop, mSingleFolderMode, mDoubleClickOverride, diff --git a/indra/newview/skins/default/xui/en/panel_marketplace_listings_inventory.xml b/indra/newview/skins/default/xui/en/panel_marketplace_listings_inventory.xml index a8a306bea9..9586957694 100644 --- a/indra/newview/skins/default/xui/en/panel_marketplace_listings_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings_inventory.xml @@ -21,5 +21,5 @@ border="false" bevel_style="none" show_item_link_overlays="true"> - + diff --git a/indra/newview/skins/default/xui/en/panel_marketplace_listings_listed.xml b/indra/newview/skins/default/xui/en/panel_marketplace_listings_listed.xml index 0c665fb07e..5f64a5d47a 100644 --- a/indra/newview/skins/default/xui/en/panel_marketplace_listings_listed.xml +++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings_listed.xml @@ -20,5 +20,5 @@ border="false" bevel_style="none" show_item_link_overlays="true"> - + diff --git a/indra/newview/skins/default/xui/en/panel_marketplace_listings_unassociated.xml b/indra/newview/skins/default/xui/en/panel_marketplace_listings_unassociated.xml index 0be405c5b8..ab4d836ba9 100644 --- a/indra/newview/skins/default/xui/en/panel_marketplace_listings_unassociated.xml +++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings_unassociated.xml @@ -19,5 +19,5 @@ border="false" bevel_style="none" show_item_link_overlays="true"> - + diff --git a/indra/newview/skins/default/xui/en/panel_marketplace_listings_unlisted.xml b/indra/newview/skins/default/xui/en/panel_marketplace_listings_unlisted.xml index 58122db7f4..303601e65b 100644 --- a/indra/newview/skins/default/xui/en/panel_marketplace_listings_unlisted.xml +++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings_unlisted.xml @@ -20,5 +20,5 @@ border="false" bevel_style="none" show_item_link_overlays="true"> - + -- cgit v1.2.3 From c4392d4da3859966ab39f44371ea42fce87ae029 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 24 May 2024 10:09:42 +0300 Subject: viewer#1408 Change misleading content removal wanring --- indra/newview/llpanelobjectinventory.cpp | 66 +++++++++++++--------- .../newview/skins/default/xui/en/notifications.xml | 9 ++- 2 files changed, 43 insertions(+), 32 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 141a1515d5..f2a469bed4 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -307,20 +307,27 @@ BOOL LLTaskInvFVBridge::isItemRenameable() const BOOL LLTaskInvFVBridge::renameItem(const std::string& new_name) { LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); - if(object) + if(!object) { - LLViewerInventoryItem* item = NULL; - item = (LLViewerInventoryItem*)object->getInventoryObject(mUUID); - if(item && (gAgent.allowOperation(PERM_MODIFY, item->getPermissions(), - GP_OBJECT_MANIPULATE, GOD_LIKE))) - { - LLPointer new_item = new LLViewerInventoryItem(item); - new_item->rename(new_name); - object->updateInventory( - new_item, - TASK_INVENTORY_ITEM_KEY, - false); - } + return false; + } + if (!object->permModify()) + { + LLNotificationsUtil::add("CantModifyContentInNoModTask"); + return false; + } + + LLViewerInventoryItem* item = NULL; + item = (LLViewerInventoryItem*)object->getInventoryObject(mUUID); + if (item && (gAgent.allowOperation(PERM_MODIFY, item->getPermissions(), + GP_OBJECT_MANIPULATE, GOD_LIKE))) + { + LLPointer new_item = new LLViewerInventoryItem(item); + new_item->rename(new_name); + object->updateInventory( + new_item, + TASK_INVENTORY_ITEM_KEY, + false); } return TRUE; } @@ -387,10 +394,7 @@ BOOL LLTaskInvFVBridge::removeItem() } else { - LLSD payload; - payload["task_id"] = mPanel->getTaskUUID(); - payload["inventory_ids"].append(mUUID); - LLNotificationsUtil::add("RemoveItemWarn", LLSD(), payload, boost::bind(&remove_task_inventory_callback, _1, _2, mPanel)); + LLNotificationsUtil::add("CantModifyContentInNoModTask"); return FALSE; } } @@ -413,15 +417,7 @@ void LLTaskInvFVBridge::removeBatch(std::vector& batch if (!object->permModify()) { - LLSD payload; - payload["task_id"] = mPanel->getTaskUUID(); - for (S32 i = 0; i < (S32)batch.size(); i++) - { - LLTaskInvFVBridge* itemp = (LLTaskInvFVBridge*)batch[i]; - payload["inventory_ids"].append(itemp->getUUID()); - } - LLNotificationsUtil::add("RemoveItemWarn", LLSD(), payload, boost::bind(&remove_task_inventory_callback, _1, _2, mPanel)); - + LLNotificationsUtil::add("CantModifyContentInNoModTask"); } else { @@ -1378,7 +1374,23 @@ BOOL LLPanelObjectInventory::postBuild() void LLPanelObjectInventory::doToSelected(const LLSD& userdata) { - LLInventoryAction::doToSelected(&gInventory, mFolders, userdata.asString()); + std::string action = userdata.asString(); + if ("rename" == action || "delete" == action) + { + LLViewerObject* objectp = gObjectList.findObject(mTaskUUID); + if (objectp && !objectp->permModify()) + { + LLNotificationsUtil::add("CantModifyContentInNoModTask"); + } + else + { + LLInventoryAction::doToSelected(&gInventory, mFolders, action); + } + } + else + { + LLInventoryAction::doToSelected(&gInventory, mFolders, action); + } } void LLPanelObjectInventory::clearContents() diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 7d237c6edd..6ad83508b8 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -4501,13 +4501,12 @@ You already have blocked this name. -Though permitted, deleting contents may damage the object. Do you want to delete that item? - confirm +You don't have permission to modify content of this object + confirm -- cgit v1.2.3 From 1fcd284cadc40a761ffbacd4bfda7dd0c4727b42 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 27 May 2024 12:59:07 +0300 Subject: viewer#1218 Moon beacon can't be toggled when setting is no-mod Two moon_layout stacks, disabling content of external disabled whole internal stack, not just specific elements. Removed extra stack. --- indra/newview/llfloatereditenvironmentbase.h | 3 ++- .../default/xui/en/panel_settings_sky_sunmoon.xml | 24 +++------------------- .../default/xui/ja/panel_settings_sky_sunmoon.xml | 4 ---- .../default/xui/pl/panel_settings_sky_sunmoon.xml | 4 ---- 4 files changed, 5 insertions(+), 30 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloatereditenvironmentbase.h b/indra/newview/llfloatereditenvironmentbase.h index 1b7771fe94..0b7d5ca39b 100644 --- a/indra/newview/llfloatereditenvironmentbase.h +++ b/indra/newview/llfloatereditenvironmentbase.h @@ -133,7 +133,8 @@ protected: LLSettingsEditPanel() : LLPanel(), mIsDirty(false), - mOnDirtyChanged() + mOnDirtyChanged(), + mCanEdit(false) {} private: diff --git a/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml b/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml index bd68434aab..34b48574d5 100644 --- a/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml +++ b/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml @@ -248,29 +248,13 @@ - - - - - + diff --git a/indra/newview/skins/default/xui/ja/panel_settings_sky_sunmoon.xml b/indra/newview/skins/default/xui/ja/panel_settings_sky_sunmoon.xml index f8837c40a7..844a556af1 100644 --- a/indra/newview/skins/default/xui/ja/panel_settings_sky_sunmoon.xml +++ b/indra/newview/skins/default/xui/ja/panel_settings_sky_sunmoon.xml @@ -44,8 +44,6 @@ - - @@ -74,8 +72,6 @@ - - diff --git a/indra/newview/skins/default/xui/pl/panel_settings_sky_sunmoon.xml b/indra/newview/skins/default/xui/pl/panel_settings_sky_sunmoon.xml index f807148617..7f9dee2369 100644 --- a/indra/newview/skins/default/xui/pl/panel_settings_sky_sunmoon.xml +++ b/indra/newview/skins/default/xui/pl/panel_settings_sky_sunmoon.xml @@ -35,8 +35,6 @@ - - Księżyc @@ -59,8 +57,6 @@ Jasność: - - -- cgit v1.2.3 From 82b1f23626f7caff3c2e428a75248f70aea64b1e Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 30 May 2024 20:38:06 +0300 Subject: viewer#1584 Reword the "Arrow keys always move me" --- indra/newview/skins/default/xui/en/panel_preferences_move.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_preferences_move.xml b/indra/newview/skins/default/xui/en/panel_preferences_move.xml index 0412466b4f..4aafceb112 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_move.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_move.xml @@ -113,7 +113,7 @@ control_name="ArrowKeysAlwaysMove" follows="left|top" height="20" - label="Arrow keys always move me" + label="Arrow keys always move me while in chat" layout="topleft" left_delta="5" name="arrow_keys_move_avatar_check" -- cgit v1.2.3 From 9f00bb19b189753d9f801e080a87c821dcdcc8af Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 31 May 2024 12:21:36 +0300 Subject: viewer#1600 Fixed being unable to delete links to worn objects --- indra/newview/llinventoryfunctions.cpp | 4 ++-- indra/newview/llinventorygallery.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 016b0880eb..be9a20b924 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -3185,7 +3185,7 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root for (LLInventoryModel::item_array_t::value_type& item : items) { - if (get_is_item_worn(item)) + if (!item->getIsLinkType() && get_is_item_worn(item)) { has_worn = true; LLWearableType::EType type = item->getWearableType(); @@ -3205,7 +3205,7 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root } } LLViewerInventoryItem* item = gInventory.getItem(obj_id); - if (item && get_is_item_worn(item)) + if (item && !item->getIsLinkType() && get_is_item_worn(item)) { has_worn = true; LLWearableType::EType type = item->getWearableType(); diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp index 329c0d751a..708e6be73e 100644 --- a/indra/newview/llinventorygallery.cpp +++ b/indra/newview/llinventorygallery.cpp @@ -1988,7 +1988,7 @@ void LLInventoryGallery::deleteSelection() for (LLInventoryModel::item_array_t::value_type& item : items) { - if (get_is_item_worn(item)) + if (!item->getIsLinkType() && get_is_item_worn(item)) { has_worn = true; LLWearableType::EType type = item->getWearableType(); @@ -2009,7 +2009,7 @@ void LLInventoryGallery::deleteSelection() } LLViewerInventoryItem* item = gInventory.getItem(id); - if (item && get_is_item_worn(item)) + if (item && !item->getIsLinkType() && get_is_item_worn(item)) { has_worn = true; LLWearableType::EType type = item->getWearableType(); -- cgit v1.2.3 From 3f150fbcf19cdfa205da1576386edc6ef2db1bda Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 31 May 2024 17:44:29 +0300 Subject: viewer#1594 Add a "Cancel" button to exit the "New List" prompt And fix infinite loop in replaceList. mLists[search_index] was extending size of the list indefinetely. --- indra/newview/llautoreplace.cpp | 5 +++-- indra/newview/llfloaterautoreplacesettings.cpp | 8 +++++++- indra/newview/skins/default/xui/en/notifications.xml | 6 +++++- 3 files changed, 15 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llautoreplace.cpp b/indra/newview/llautoreplace.cpp index e1d494f7c7..08e09d2d22 100644 --- a/indra/newview/llautoreplace.cpp +++ b/indra/newview/llautoreplace.cpp @@ -536,11 +536,12 @@ LLAutoReplaceSettings::AddListResult LLAutoReplaceSettings::replaceList(const LL S32 search_index; LLSD targetList; // The following is working around the fact that LLSD arrays containing maps also seem to have undefined entries... see LLSD-30 - for ( search_index = 0, targetList = mLists[0]; + for ( search_index = 0; !listFound && search_index < mLists.size(); - search_index += 1, targetList = mLists[search_index] + search_index += 1 ) { + targetList = mLists[search_index]; if ( targetList.isMap() ) { if ( listNameMatches( targetList, listName) ) diff --git a/indra/newview/llfloaterautoreplacesettings.cpp b/indra/newview/llfloaterautoreplacesettings.cpp index bdcaf2dc22..f4e13f4bf7 100644 --- a/indra/newview/llfloaterautoreplacesettings.cpp +++ b/indra/newview/llfloaterautoreplacesettings.cpp @@ -422,7 +422,13 @@ bool LLFloaterAutoReplaceSettings::callbackNewListName(const LLSD& notification, LLSD newList = notification["payload"]["list"]; - if ( response.has("listname") && response["listname"].isString() ) + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option != 1) // Must also match RenameAutoReplaceList + { + // user cancelled + return false; + } + else if (response.has("listname") && response["listname"].isString() ) { std::string newName = response["listname"].asString(); LLAutoReplaceSettings::setListName(newList, newName); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 6ad83508b8..ed040bf50d 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -3100,9 +3100,13 @@ Would you be my friend?