Back out fix to prevent items going to trash during cut&paste - fix from LL is coming in next merge
parent
d48538d3ab
commit
ca98cd73db
|
|
@ -942,14 +942,6 @@ void LLFolderViewItem::draw()
|
|||
}
|
||||
|
||||
LLColor4 color = (mIsSelected && filled) ? mFontHighlightColor : mFontColor;
|
||||
// <FS:Ansariel> Re-apply FIRE-6714: Don't move objects to trash during cut&paste
|
||||
// Don't hide cut items in inventory
|
||||
if (!getRoot()->getFolderViewModel()->getFilter().checkClipboard(getViewModelItem()))
|
||||
{
|
||||
// Fade out item color to indicate it's being cut
|
||||
color.mV[VALPHA] *= 0.5f;
|
||||
}
|
||||
// </FS:Ansariel> Re-apply FIRE-6714: Don't move objects to trash during cut&paste
|
||||
drawLabel(font, text_left, y, color, right_x);
|
||||
|
||||
// <FS:Ansariel> Special for protected items
|
||||
|
|
|
|||
|
|
@ -83,8 +83,6 @@ public:
|
|||
// +-------------------------------------------------------------------+
|
||||
virtual bool check(const LLFolderViewModelItem* item) = 0;
|
||||
virtual bool checkFolder(const LLFolderViewModelItem* folder) const = 0;
|
||||
// <FS:Ansariel> For clipboard highlighting
|
||||
virtual bool checkClipboard(const LLFolderViewModelItem* item) = 0;
|
||||
|
||||
virtual void setEmptyLookupMessage(const std::string& message) = 0;
|
||||
virtual std::string getEmptyLookupMessage() const = 0;
|
||||
|
|
|
|||
|
|
@ -243,8 +243,6 @@ public:
|
|||
|
||||
bool check(const LLFolderViewModelItem* item) { return true; }
|
||||
bool checkFolder(const LLFolderViewModelItem* folder) const { return true; }
|
||||
// <FS:Ansariel> For clipboard highlighting
|
||||
bool checkClipboard(const LLFolderViewModelItem* item) { return true; }
|
||||
void setEmptyLookupMessage(const std::string& message) { }
|
||||
std::string getEmptyLookupMessage() const { return mEmpty; }
|
||||
bool showAllResults() const { return true; }
|
||||
|
|
|
|||
|
|
@ -331,8 +331,7 @@ BOOL LLInvFVBridge::perform_cutToClipboard()
|
|||
{
|
||||
LLClipboard::instance().setCutMode(true);
|
||||
BOOL added_to_clipboard = LLClipboard::instance().addToClipboard(mUUID);
|
||||
// <FS:Ansariel> Re-apply FIRE-6714: Don't move objects to trash during cut&paste
|
||||
//removeObject(&gInventory, mUUID); // Always perform the remove even if the object couldn't make it to the clipboard
|
||||
removeObject(&gInventory, mUUID); // Always perform the remove even if the object couldn't make it to the clipboard
|
||||
return added_to_clipboard;
|
||||
}
|
||||
return FALSE;
|
||||
|
|
|
|||
|
|
@ -118,11 +118,7 @@ bool LLInventoryFilter::check(const LLFolderViewModelItem* item)
|
|||
const LLFolderViewModelItemInventory* listener = dynamic_cast<const LLFolderViewModelItemInventory*>(item);
|
||||
|
||||
// Clipboard cut items are *always* filtered so we need this value upfront
|
||||
// <FS:Ansariel> FIRE-6714: Don't move objects to trash during cut&paste
|
||||
// Don't hide cut items in inventory
|
||||
//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
|
||||
const BOOL passed_clipboard = (listener ? checkAgainstClipboard(listener->getUUID()) : TRUE);
|
||||
|
||||
// If it's a folder and we're showing all folders, return automatically.
|
||||
const BOOL is_folder = listener->getInventoryType() == LLInventoryType::IT_CATEGORY;
|
||||
|
|
@ -200,11 +196,7 @@ bool LLInventoryFilter::check(const LLInventoryItem* item)
|
|||
const bool passed_string = (mFilterSubString.size() ? item->getName().find(mFilterSubString) != std::string::npos : true);
|
||||
const bool passed_filtertype = checkAgainstFilterType(item);
|
||||
const bool passed_permissions = checkAgainstPermissions(item);
|
||||
// <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_clipboard = checkAgainstClipboard(item->getUUID());
|
||||
|
||||
return passed_filtertype && passed_permissions && passed_clipboard && passed_string;
|
||||
}
|
||||
|
|
@ -226,11 +218,7 @@ bool LLInventoryFilter::checkFolder(const LLFolderViewModelItem* item) const
|
|||
bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const
|
||||
{
|
||||
// Always check against the clipboard
|
||||
// <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
|
||||
const BOOL passed_clipboard = checkAgainstClipboard(folder_id);
|
||||
|
||||
// we're showing all folders, overriding filter
|
||||
if (mFilterOps.mShowFolderState == LLInventoryFilter::SHOW_ALL_FOLDERS)
|
||||
|
|
@ -528,19 +516,6 @@ bool LLInventoryFilter::checkAgainstClipboard(const LLUUID& object_id) const
|
|||
return true;
|
||||
}
|
||||
|
||||
// <FS:Ansariel> For clipboard highlighting
|
||||
bool LLInventoryFilter::checkClipboard(const LLFolderViewModelItem* item)
|
||||
{
|
||||
const LLFolderViewModelItemInventory* listener = dynamic_cast<const LLFolderViewModelItemInventory*>(item);
|
||||
if (!listener)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return checkAgainstClipboard(listener->getUUID());
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
bool LLInventoryFilter::checkAgainstPermissions(const LLFolderViewModelItemInventory* listener) const
|
||||
{
|
||||
if (!listener) return FALSE;
|
||||
|
|
|
|||
|
|
@ -235,8 +235,6 @@ public:
|
|||
// +-------------------------------------------------------------------+
|
||||
bool check(const LLFolderViewModelItem* listener);
|
||||
bool check(const LLInventoryItem* item);
|
||||
// <FS:Ansariel> For clipboard highlighting
|
||||
bool checkClipboard(const LLFolderViewModelItem* item);
|
||||
bool checkFolder(const LLFolderViewModelItem* listener) const;
|
||||
bool checkFolder(const LLUUID& folder_id) const;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue