From 7c489e0480221b9c85a919f02f2a1d45b936f6e7 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 30 Nov 2022 17:18:31 +0200 Subject: SL-18648 Clean up unused mNonImmediateFilterPermMask --- indra/newview/llfloaterland.cpp | 1 - indra/newview/llmaterialeditor.cpp | 4 ---- indra/newview/lloutfitgallery.cpp | 1 - indra/newview/llpaneleditwearable.cpp | 1 - indra/newview/llpanellandmedia.cpp | 1 - indra/newview/llpanelobject.cpp | 2 -- indra/newview/llpanelprofile.cpp | 2 -- indra/newview/lltexturectrl.cpp | 22 ---------------------- indra/newview/lltexturectrl.h | 8 -------- 9 files changed, 42 deletions(-) diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 1a98ab9d76..9c4c9b3e59 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -2004,7 +2004,6 @@ BOOL LLPanelLandOptions::postBuild() mSnapshotCtrl->setAllowNoTexture ( TRUE ); mSnapshotCtrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER); mSnapshotCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER); - mSnapshotCtrl->setNonImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER); } else { diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index 07c283e9c2..4b9d870d18 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -391,13 +391,9 @@ BOOL LLMaterialEditor::postBuild() { // Only allow fully permissive textures mBaseColorTextureCtrl->setImmediateFilterPermMask(PERM_ITEM_UNRESTRICTED); - mBaseColorTextureCtrl->setNonImmediateFilterPermMask(PERM_ITEM_UNRESTRICTED); mMetallicTextureCtrl->setImmediateFilterPermMask(PERM_ITEM_UNRESTRICTED); - mMetallicTextureCtrl->setNonImmediateFilterPermMask(PERM_ITEM_UNRESTRICTED); mEmissiveTextureCtrl->setImmediateFilterPermMask(PERM_ITEM_UNRESTRICTED); - mEmissiveTextureCtrl->setNonImmediateFilterPermMask(PERM_ITEM_UNRESTRICTED); mNormalTextureCtrl->setImmediateFilterPermMask(PERM_ITEM_UNRESTRICTED); - mNormalTextureCtrl->setNonImmediateFilterPermMask(PERM_ITEM_UNRESTRICTED); } // Texture callback diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp index d11b3b57f3..2d1cd43e94 100644 --- a/indra/newview/lloutfitgallery.cpp +++ b/indra/newview/lloutfitgallery.cpp @@ -1360,7 +1360,6 @@ void LLOutfitGallery::onSelectPhoto(LLUUID selected_outfit_id) "SELECT PHOTO", PERM_NONE, PERM_NONE, - PERM_NONE, FALSE, NULL); diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index ea10aa75ae..69998e8be4 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -574,7 +574,6 @@ static void init_texture_ctrl(LLPanelEditWearable* self, LLPanel* panel, const L // Don't allow (no copy) or (notransfer) textures to be selected. texture_ctrl->setImmediateFilterPermMask(PERM_NONE); texture_ctrl->setDnDFilterPermMask(PERM_NONE); - texture_ctrl->setNonImmediateFilterPermMask(PERM_NONE); } } diff --git a/indra/newview/llpanellandmedia.cpp b/indra/newview/llpanellandmedia.cpp index 26cd3ff1c1..213a66f005 100644 --- a/indra/newview/llpanellandmedia.cpp +++ b/indra/newview/llpanellandmedia.cpp @@ -86,7 +86,6 @@ BOOL LLPanelLandMedia::postBuild() mMediaTextureCtrl->setAllowNoTexture ( TRUE ); mMediaTextureCtrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER); mMediaTextureCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER); - mMediaTextureCtrl->setNonImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER); mMediaAutoScaleCheck = getChild("media_auto_scale"); childSetCommitCallback("media_auto_scale", onCommitAny, this); diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 0bfc1297d3..0236b66b70 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -250,8 +250,6 @@ BOOL LLPanelObject::postBuild() // Don't allow (no copy) or (no transfer) textures to be selected during immediate mode mCtrlSculptTexture->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER); mCtrlSculptTexture->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER); - // Allow any texture to be used during non-immediate mode. - mCtrlSculptTexture->setNonImmediateFilterPermMask(PERM_NONE); LLAggregatePermissions texture_perms; if (LLSelectMgr::getInstance()->selectGetAggregateTexturePermissions(texture_perms)) { diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index f4eaa78f11..d9a8d496d1 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -1864,7 +1864,6 @@ void LLPanelProfileSecondLife::onShowTexturePicker() "SELECT PHOTO", PERM_NONE, PERM_NONE, - PERM_NONE, FALSE, NULL); @@ -2205,7 +2204,6 @@ void LLPanelProfileFirstLife::onChangePhoto() "SELECT PHOTO", PERM_NONE, PERM_NONE, - PERM_NONE, FALSE, NULL); diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 3374af1c76..9891d7b078 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -148,7 +148,6 @@ LLFloaterTexturePicker::LLFloaterTexturePicker( const std::string& label, PermissionMask immediate_filter_perm_mask, PermissionMask dnd_filter_perm_mask, - PermissionMask non_immediate_filter_perm_mask, BOOL can_apply_immediately, LLUIImagePtr fallback_image) : LLFloater(LLSD()), @@ -167,7 +166,6 @@ LLFloaterTexturePicker::LLFloaterTexturePicker( mFilterEdit(NULL), mImmediateFilterPermMask(immediate_filter_perm_mask), mDnDFilterPermMask(dnd_filter_perm_mask), - mNonImmediateFilterPermMask(non_immediate_filter_perm_mask), mContextConeOpacity(0.f), mSelectedItemPinned( FALSE ), mCanApply(true), @@ -254,7 +252,6 @@ void LLFloaterTexturePicker::setCanApplyImmediately(BOOL b) mCanApplyImmediately = b; getChild("apply_immediate_check")->setValue(mCanApplyImmediately); - updateFilterPermMask(); } void LLFloaterTexturePicker::stopUsingPipette() @@ -332,7 +329,6 @@ BOOL LLFloaterTexturePicker::handleDragAndDrop( if (mod) item_perm_mask |= PERM_MODIFY; if (xfer) item_perm_mask |= PERM_TRANSFER; - //PermissionMask filter_perm_mask = getFilterPermMask(); Commented out due to no-copy texture loss. PermissionMask filter_perm_mask = mDnDFilterPermMask; if ( (item_perm_mask & filter_perm_mask) == filter_perm_mask ) { @@ -488,8 +484,6 @@ BOOL LLFloaterTexturePicker::postBuild() childSetAction("Cancel", LLFloaterTexturePicker::onBtnCancel,this); childSetAction("Select", LLFloaterTexturePicker::onBtnSelect,this); - // update permission filter once UI is fully initialized - updateFilterPermMask(); mSavedFolderState.setApply(FALSE); LLToolPipette::getInstance()->setToolSelectCallback(boost::bind(&LLFloaterTexturePicker::onTextureSelect, this, _1)); @@ -667,12 +661,6 @@ const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, BOOL co return LLUUID::null; } -PermissionMask LLFloaterTexturePicker::getFilterPermMask() -{ - bool apply_immediate = getChild("apply_immediate_check")->getValue().asBoolean(); - return apply_immediate ? mImmediateFilterPermMask : mNonImmediateFilterPermMask; -} - void LLFloaterTexturePicker::commitIfImmediateSet() { if (!mNoCopyTextureSelected && mOnFloaterCommitCallback && mCanApply) @@ -1051,7 +1039,6 @@ void LLFloaterTexturePicker::onApplyImmediateCheck(LLUICtrl* ctrl, void *user_da LLCheckBoxCtrl* check_box = (LLCheckBoxCtrl*)ctrl; gSavedSettings.setBOOL("TextureLivePreview", check_box->get()); - picker->updateFilterPermMask(); picker->commitIfImmediateSet(); } @@ -1128,11 +1115,6 @@ void LLFloaterTexturePicker::onBakeTextureSelect(LLUICtrl* ctrl, void *user_data } } -void LLFloaterTexturePicker::updateFilterPermMask() -{ - //mInventoryPanel->setFilterPermMask( getFilterPermMask() ); Commented out due to no-copy texture loss. -} - void LLFloaterTexturePicker::setCanApply(bool can_preview, bool can_apply) { getChildRef("Select").setEnabled(can_apply); @@ -1372,7 +1354,6 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p) mAllowNoTexture( p.allow_no_texture ), mAllowLocalTexture( TRUE ), mImmediateFilterPermMask( PERM_NONE ), - mNonImmediateFilterPermMask( PERM_NONE ), mCanApplyImmediately( FALSE ), mNeedsRawImageData( FALSE ), mValid( TRUE ), @@ -1552,7 +1533,6 @@ void LLTextureCtrl::showPicker(BOOL take_focus) mLabel, mImmediateFilterPermMask, mDnDFilterPermMask, - mNonImmediateFilterPermMask, mCanApplyImmediately, mFallbackImage); mFloaterHandle = floaterp->getHandle(); @@ -1984,8 +1964,6 @@ BOOL LLTextureCtrl::allowDrop(LLInventoryItem* item) if (mod) item_perm_mask |= PERM_MODIFY; if (xfer) item_perm_mask |= PERM_TRANSFER; -// PermissionMask filter_perm_mask = mCanApplyImmediately ? commented out due to no-copy texture loss. -// mImmediateFilterPermMask : mNonImmediateFilterPermMask; PermissionMask filter_perm_mask = mImmediateFilterPermMask; if ( (item_perm_mask & filter_perm_mask) == filter_perm_mask ) { diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index d06a82bbd5..8d6a520dfd 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -187,10 +187,7 @@ public: { mImmediateFilterPermMask = mask; } void setDnDFilterPermMask(PermissionMask mask) { mDnDFilterPermMask = mask; } - void setNonImmediateFilterPermMask(PermissionMask mask) - { mNonImmediateFilterPermMask = mask; } PermissionMask getImmediateFilterPermMask() { return mImmediateFilterPermMask; } - PermissionMask getNonImmediateFilterPermMask() { return mNonImmediateFilterPermMask; } void closeDependentFloater(); @@ -252,7 +249,6 @@ private: BOOL mAllowLocalTexture; PermissionMask mImmediateFilterPermMask; PermissionMask mDnDFilterPermMask; - PermissionMask mNonImmediateFilterPermMask; BOOL mCanApplyImmediately; BOOL mCommitOnSelection; BOOL mNeedsRawImageData; @@ -286,7 +282,6 @@ public: const std::string& label, PermissionMask immediate_filter_perm_mask, PermissionMask dnd_filter_perm_mask, - PermissionMask non_immediate_filter_perm_mask, BOOL can_apply_immediately, LLUIImagePtr fallback_image_name ); @@ -317,9 +312,7 @@ public: LLView* getOwner() const { return mOwner; } void setOwner(LLView* owner) { mOwner = owner; } void stopUsingPipette(); - PermissionMask getFilterPermMask(); - void updateFilterPermMask(); void commitIfImmediateSet(); void commitCancel(); @@ -388,7 +381,6 @@ protected: LLInventoryPanel* mInventoryPanel; PermissionMask mImmediateFilterPermMask; PermissionMask mDnDFilterPermMask; - PermissionMask mNonImmediateFilterPermMask; BOOL mCanApplyImmediately; BOOL mNoCopyTextureSelected; F32 mContextConeOpacity; -- cgit v1.2.3