diff options
| author | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2026-08-12 19:12:44 -0400 |
|---|---|---|
| committer | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2026-08-12 19:12:44 -0400 |
| commit | e3a92a3f8e7d6df3772adcecb037149e6fcf0f3e (patch) | |
| tree | 537bdcfb9019a39b45a27f8d04f8ca3c1c5d87e6 | |
| parent | 159a08c98dcba2bdf25caf13b236e27c54eda050 (diff) | |
| parent | b6648c2b4b69eceb5264b850d92702ae1c5e6911 (diff) | |
Merge branch 'develop' into geenz/linux-to-develop
| -rw-r--r-- | indra/newview/llinventorybridge.cpp | 11 | ||||
| -rw-r--r-- | indra/newview/llviewermedia.cpp | 51 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 11 |
3 files changed, 37 insertions, 36 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 8e4e70474f..58ca1da032 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4136,6 +4136,17 @@ void LLFolderBridge::perform_pasteFromClipboard() } else { + // Check that no folder is being pasted into itself or into one of its descendants + for (const LLUUID& item_id : objects) + { + LLInventoryCategory* cat = model->getCategory(item_id); + if (cat && (item_id == mUUID || model->isObjectDescendentOf(mUUID, item_id))) + { + LLNotificationsUtil::add("CannotPasteFolderIntoSelf"); + return; + } + } + // Check that all items can be moved into that folder : for the moment, only stock folder mismatch is checked for (std::vector<LLUUID>::const_iterator iter = objects.begin(); iter != objects.end(); ++iter) { diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 0590abc42e..5d01e08875 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -560,55 +560,34 @@ LLViewerMedia::impl_list &LLViewerMedia::getPriorityList() // This is the predicate function used to sort sViewerMediaImplList by priority. bool LLViewerMedia::priorityComparitor(const LLViewerMediaImpl* i1, const LLViewerMediaImpl* i2) { - if(i1->isForcedUnloaded() && !i2->isForcedUnloaded()) + // isForcedUnloaded can be pricey, avoid a repeat, + // note that this one is specifically i2, when everything else is i1 + // Consider making isForcedUnloaded cache the value temporarily? + bool i2_forced_unloaded = i2->isForcedUnloaded(); + if (i1->isForcedUnloaded() != i2_forced_unloaded) { // Muted or failed items always go to the end of the list, period. - return false; - } - else if(i2->isForcedUnloaded() && !i1->isForcedUnloaded()) - { - // Muted or failed items always go to the end of the list, period. - return true; - } - else if(i1->hasFocus()) - { - // The item with user focus always comes to the front of the list, period. - return true; + return i2_forced_unloaded; } - else if(i2->hasFocus()) + else if(i1->hasFocus() != i2->hasFocus()) { // The item with user focus always comes to the front of the list, period. - return false; - } - else if(i1->isParcelMedia()) - { - // The parcel media impl sorts above all other inworld media, unless one has focus. - return true; + return i1->hasFocus(); } - else if(i2->isParcelMedia()) + else if(i1->isParcelMedia() != i2->isParcelMedia()) { // The parcel media impl sorts above all other inworld media, unless one has focus. - return false; - } - else if(i1->getUsedInUI() && !i2->getUsedInUI()) - { - // i1 is a UI element, i2 is not. This makes i1 "less than" i2, so it sorts earlier in our list. - return true; + return i1->isParcelMedia(); } - else if(i2->getUsedInUI() && !i1->getUsedInUI()) + else if (i1->getUsedInUI() != i2->getUsedInUI()) { - // i2 is a UI element, i1 is not. This makes i2 "less than" i1, so it sorts earlier in our list. - return false; - } - else if(i1->isPlayable() && !i2->isPlayable()) - { - // Playable items sort above ones that wouldn't play even if they got high enough priority - return true; + // UI elements sort above inworld media. + return i1->getUsedInUI(); } - else if(!i1->isPlayable() && i2->isPlayable()) + else if (i1->isPlayable() != i2->isPlayable()) { // Playable items sort above ones that wouldn't play even if they got high enough priority - return false; + return i1->isPlayable(); } else if(i1->getInterest() == i2->getInterest()) { diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 42ec875bcd..833a09eab8 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -425,6 +425,17 @@ Initialization with the Marketplace failed because of a system or network error. </notification> <notification + icon="alertmodal.tga" + name="CannotPasteFolderIntoSelf" + type="alertmodal"> + You cannot paste a folder into itself or into one of its subfolders. + <tag>fail</tag> + <usetemplate + name="okbutton" + yestext="OK"/> + </notification> + + <notification icon="notifytip.tga" name="InvalidKeystroke" type="notifytip"> |
