FIRE-6714: Improved inventory cut operation experience: Don't move items to trash when cutting, fade out item names instead of hiding it from the user. Also fixes FIRE-6696
parent
0f8085320a
commit
223f38aecb
|
|
@ -1423,7 +1423,9 @@ void LLFolderView::cut()
|
|||
listener->cutToClipboard();
|
||||
}
|
||||
}
|
||||
LLFolderView::removeCutItems();
|
||||
// <FS:Ansariel> FIRE-6714: Don't move objects to trash during cut&paste
|
||||
//LLFolderView::removeCutItems();
|
||||
// </FS:Ansariel> FIRE-6714: Don't move objects to trash during cut&paste
|
||||
}
|
||||
mSearchString.clear();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1139,6 +1139,15 @@ void LLFolderViewItem::draw()
|
|||
//--------------------------------------------------------------------------------//
|
||||
// Draw the actual label text
|
||||
//
|
||||
// <FS:Ansariel> FIRE-6714: Don't move objects to trash during cut&paste
|
||||
// Don't hide cut items in inventory
|
||||
if (!getRoot()->getFilter()->checkAgainstClipboard(mListener->getUUID()))
|
||||
{
|
||||
// Fade out item color to indicate it's being cut
|
||||
color.mV[VALPHA] *= 0.5f;
|
||||
}
|
||||
// </FS:Ansariel> FIRE-6714: Don't move objects to trash during cut&paste
|
||||
|
||||
font->renderUTF8(mLabel, 0, text_left, y, color,
|
||||
LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
|
||||
S32_MAX, getRect().getWidth() - (S32) text_left, &right_x, TRUE);
|
||||
|
|
|
|||
|
|
@ -1431,7 +1431,9 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action)
|
|||
else if ("cut" == action)
|
||||
{
|
||||
cutToClipboard();
|
||||
LLFolderView::removeCutItems();
|
||||
// <FS:Ansariel> FIRE-6714: Don't move objects to trash during cut&paste
|
||||
//LLFolderView::removeCutItems();
|
||||
// </FS:Ansariel> FIRE-6714: Don't move objects to trash during cut&paste
|
||||
return;
|
||||
}
|
||||
else if ("copy" == action)
|
||||
|
|
@ -1439,11 +1441,6 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action)
|
|||
copyToClipboard();
|
||||
return;
|
||||
}
|
||||
else if ("cut" == action)
|
||||
{
|
||||
cutToClipboard();
|
||||
return;
|
||||
}
|
||||
else if ("paste" == action)
|
||||
{
|
||||
LLInventoryItem* itemp = model->getItem(mUUID);
|
||||
|
|
@ -2869,7 +2866,9 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action)
|
|||
else if ("cut" == action)
|
||||
{
|
||||
cutToClipboard();
|
||||
LLFolderView::removeCutItems();
|
||||
// <FS:Ansariel> FIRE-6714: Don't move objects to trash during cut&paste
|
||||
//LLFolderView::removeCutItems();
|
||||
// </FS:Ansariel> FIRE-6714: Don't move objects to trash during cut&paste
|
||||
return;
|
||||
}
|
||||
else if ("copy" == action)
|
||||
|
|
|
|||
|
|
@ -144,8 +144,12 @@ const std::string& LLInventoryFilter::getSearchableTarget(const LLFolderViewItem
|
|||
BOOL LLInventoryFilter::check(const LLFolderViewItem* item)
|
||||
{
|
||||
// Clipboard cut items are *always* filtered so we need this value upfront
|
||||
const LLFolderViewEventListener* listener = item->getListener();
|
||||
const BOOL passed_clipboard = (listener ? checkAgainstClipboard(listener->getUUID()) : TRUE);
|
||||
// <FS:Ansariel> FIRE-6714: Don't move objects to trash during cut&paste
|
||||
// Don't hide cut items in inventory
|
||||
//const LLFolderViewEventListener* listener = item->getListener();
|
||||
//const BOOL passed_clipboard = (listener ? checkAgainstClipboard(listener->getUUID()) : TRUE);
|
||||
const BOOL passed_clipboard = TRUE;
|
||||
// </FS:Ansariel> FIRE-6714: Don't move objects to trash during cut&paste
|
||||
|
||||
// If it's a folder and we're showing all folders, return automatically.
|
||||
const BOOL is_folder = (dynamic_cast<const LLFolderViewFolder*>(item) != NULL);
|
||||
|
|
@ -204,7 +208,11 @@ bool LLInventoryFilter::check(const LLInventoryItem* item)
|
|||
|
||||
const bool passed_filtertype = checkAgainstFilterType(item);
|
||||
const bool passed_permissions = checkAgainstPermissions(item);
|
||||
const BOOL passed_clipboard = checkAgainstClipboard(item->getUUID());
|
||||
// <FS:Ansariel> FIRE-6714: Don't move objects to trash during cut&paste
|
||||
// Don't hide cut items in inventory
|
||||
//const BOOL passed_clipboard = checkAgainstClipboard(item->getUUID());
|
||||
const BOOL passed_clipboard = TRUE;
|
||||
// </FS:Ansariel> Don't filter cut items
|
||||
const bool passed = (passed_filtertype &&
|
||||
passed_permissions &&
|
||||
passed_clipboard &&
|
||||
|
|
@ -238,7 +246,11 @@ bool LLInventoryFilter::checkFolder(const LLFolderViewFolder* folder) const
|
|||
bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const
|
||||
{
|
||||
// Always check against the clipboard
|
||||
const BOOL passed_clipboard = checkAgainstClipboard(folder_id);
|
||||
// <FS:Ansariel> FIRE-6714: Don't move objects to trash during cut&paste
|
||||
// Don't hide cut items in inventory
|
||||
//const BOOL passed_clipboard = checkAgainstClipboard(folder_id);
|
||||
const BOOL passed_clipboard = TRUE;
|
||||
// </FS:Ansariel> FIRE-6714: Don't move objects to trash during cut&paste
|
||||
|
||||
// we're showing all folders, overriding filter
|
||||
if (mFilterOps.mShowFolderState == LLInventoryFilter::SHOW_ALL_FOLDERS)
|
||||
|
|
|
|||
Loading…
Reference in New Issue