Seth ProductEngine avatar Seth ProductEngine committed 55dff7a

EXP-1335 FIXED Disabled dragging the items from notecards and objects into Recent tab.
Disabled DnD from Recent to Received Items.
Fixed updating FILTERTYPE_DATE flag of LLInventoryFilter when time limits are applied.

Comments (0)

Files changed (3)

indra/newview/llinventoryfilter.cpp

 	// Pass if this item is within the date range.
 	if (filterTypes & FILTERTYPE_DATE)
 	{
-		const U16 HOURS_TO_SECONDS = 3600;
-		time_t earliest = time_corrected() - mFilterOps.mHoursAgo * HOURS_TO_SECONDS;
-		if (mFilterOps.mMinDate > time_min() && mFilterOps.mMinDate < earliest)
-		{
-			earliest = mFilterOps.mMinDate;
-		}
-		else if (!mFilterOps.mHoursAgo)
-		{
-			earliest = 0;
-		}
-		if (item->getCreationDate() < earliest ||
-			item->getCreationDate() > mFilterOps.mMaxDate)
-			return false;
+		// We don't get the updated item creation date for the task inventory or
+		// a notecard embedded item. See LLTaskInvFVBridge::getCreationDate().
+		return false;
 	}
 
 	return true;
 		mFilterOps.mMaxDate = llmax(mFilterOps.mMinDate, max_date);
 		setModified();
 	}
-	mFilterOps.mFilterTypes |= FILTERTYPE_DATE;
+
+	areDateLimitsSet() ? mFilterOps.mFilterTypes |= FILTERTYPE_DATE
+			: mFilterOps.mFilterTypes &= ~FILTERTYPE_DATE;
 }
 
 void LLInventoryFilter::setDateRangeLastLogoff(BOOL sl)
 	}
 	if (!sl && isSinceLogoff())
 	{
-		setDateRange(0, time_max());
+		setDateRange(time_min(), time_max());
 		setModified();
 	}
-	mFilterOps.mFilterTypes |= FILTERTYPE_DATE;
+
+	areDateLimitsSet() ? mFilterOps.mFilterTypes |= FILTERTYPE_DATE
+			: mFilterOps.mFilterTypes &= ~FILTERTYPE_DATE;
 }
 
 BOOL LLInventoryFilter::isSinceLogoff() const
 			setModified(FILTER_RESTART);
 		}
 	}
-	mFilterOps.mFilterTypes |= FILTERTYPE_DATE;
+
+	areDateLimitsSet() ? mFilterOps.mFilterTypes |= FILTERTYPE_DATE
+			: mFilterOps.mFilterTypes &= ~FILTERTYPE_DATE;
 }
 
 void LLInventoryFilter::setFilterLinks(U64 filter_links)
 	return mEmptyLookupMessage;
 
 }
+
+bool LLInventoryFilter::areDateLimitsSet()
+{
+	return     mFilterOps.mMinDate != time_min()
+			|| mFilterOps.mMaxDate != time_max()
+			|| mFilterOps.mHoursAgo != 0;
+}

indra/newview/llinventoryfilter.h

 	void 				fromLLSD(LLSD& data);
 
 private:
+	bool				areDateLimitsSet();
+
 	struct FilterOps
 	{
 		FilterOps();

indra/newview/skins/default/xui/en/panel_inbox_inventory.xml

 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <inbox_inventory_panel
+    accepts_drag_and_drop="false"
     name="inventory_inbox"
     start_folder="Received Items"
     follows="all" layout="topleft"
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.