SL-11002 FIXED 'Created by me' and 'Created by others' checkboxes are not reset using 'Reset Filters'
parent
c23b6f1461
commit
3839444abe
|
|
@ -58,6 +58,7 @@ LLInventoryFilter::FilterOps::FilterOps(const Params& p)
|
|||
mHoursAgo(p.hours_ago),
|
||||
mDateSearchDirection(p.date_search_direction),
|
||||
mShowFolderState(p.show_folder_state),
|
||||
mFilterCreatorType(p.creator_type),
|
||||
mPermissions(p.permissions),
|
||||
mFilterTypes(p.types),
|
||||
mFilterUUID(p.uuid),
|
||||
|
|
@ -78,8 +79,7 @@ LLInventoryFilter::LLInventoryFilter(const Params& p)
|
|||
mCurrentGeneration(0),
|
||||
mFirstRequiredGeneration(0),
|
||||
mFirstSuccessGeneration(0),
|
||||
mSearchType(SEARCHTYPE_NAME),
|
||||
mFilterCreatorType(FILTERCREATOR_ALL)
|
||||
mSearchType(SEARCHTYPE_NAME)
|
||||
{
|
||||
// copy mFilterOps into mDefaultFilterOps
|
||||
markDefault();
|
||||
|
|
@ -489,7 +489,7 @@ bool LLInventoryFilter::checkAgainstCreator(const LLFolderViewModelItemInventory
|
|||
{
|
||||
if (!listener) return TRUE;
|
||||
const BOOL is_folder = listener->getInventoryType() == LLInventoryType::IT_CATEGORY;
|
||||
switch(mFilterCreatorType)
|
||||
switch (mFilterOps.mFilterCreatorType)
|
||||
{
|
||||
case FILTERCREATOR_SELF:
|
||||
if(is_folder) return FALSE;
|
||||
|
|
@ -601,9 +601,9 @@ void LLInventoryFilter::setSearchType(ESearchType type)
|
|||
|
||||
void LLInventoryFilter::setFilterCreator(EFilterCreatorType type)
|
||||
{
|
||||
if(mFilterCreatorType != type)
|
||||
if (mFilterOps.mFilterCreatorType != type)
|
||||
{
|
||||
mFilterCreatorType = type;
|
||||
mFilterOps.mFilterCreatorType = type;
|
||||
setModified();
|
||||
}
|
||||
}
|
||||
|
|
@ -1194,6 +1194,7 @@ void LLInventoryFilter::toParams(Params& params) const
|
|||
params.filter_ops.hours_ago = getHoursAgo();
|
||||
params.filter_ops.date_search_direction = getDateSearchDirection();
|
||||
params.filter_ops.show_folder_state = getShowFolderState();
|
||||
params.filter_ops.creator_type = getFilterCreatorType();
|
||||
params.filter_ops.permissions = getFilterPermissions();
|
||||
params.substring = getFilterSubString();
|
||||
params.since_logoff = isSinceLogoff();
|
||||
|
|
@ -1216,6 +1217,7 @@ void LLInventoryFilter::fromParams(const Params& params)
|
|||
setHoursAgo(params.filter_ops.hours_ago);
|
||||
setDateSearchDirection(params.filter_ops.date_search_direction);
|
||||
setShowFolderState(params.filter_ops.show_folder_state);
|
||||
setFilterCreator(params.filter_ops.creator_type);
|
||||
setFilterPermissions(params.filter_ops.permissions);
|
||||
setFilterSubString(params.substring);
|
||||
setDateRangeLastLogoff(params.since_logoff);
|
||||
|
|
@ -1278,6 +1280,11 @@ LLInventoryFilter::EFolderShow LLInventoryFilter::getShowFolderState() const
|
|||
return mFilterOps.mShowFolderState;
|
||||
}
|
||||
|
||||
LLInventoryFilter::EFilterCreatorType LLInventoryFilter::getFilterCreatorType() const
|
||||
{
|
||||
return mFilterOps.mFilterCreatorType;
|
||||
}
|
||||
|
||||
bool LLInventoryFilter::isTimedOut()
|
||||
{
|
||||
return mFilterTime.hasExpired();
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ public:
|
|||
Optional<U32> date_search_direction;
|
||||
Optional<EFolderShow> show_folder_state;
|
||||
Optional<PermissionMask> permissions;
|
||||
Optional<EFilterCreatorType> creator_type;
|
||||
|
||||
Params()
|
||||
: types("filter_types", FILTERTYPE_OBJECT),
|
||||
|
|
@ -138,6 +139,7 @@ public:
|
|||
hours_ago("hours_ago", 0),
|
||||
date_search_direction("date_search_direction", FILTERDATEDIRECTION_NEWER),
|
||||
show_folder_state("show_folder_state", SHOW_NON_EMPTY_FOLDERS),
|
||||
creator_type("creator_type", FILTERCREATOR_ALL),
|
||||
permissions("permissions", PERM_NONE)
|
||||
{}
|
||||
};
|
||||
|
|
@ -156,8 +158,9 @@ public:
|
|||
U32 mHoursAgo;
|
||||
U32 mDateSearchDirection;
|
||||
|
||||
EFolderShow mShowFolderState;
|
||||
PermissionMask mPermissions;
|
||||
EFolderShow mShowFolderState;
|
||||
PermissionMask mPermissions;
|
||||
EFilterCreatorType mFilterCreatorType;
|
||||
};
|
||||
|
||||
struct Params : public LLInitParam::Block<Params>
|
||||
|
|
@ -202,7 +205,6 @@ public:
|
|||
void setSearchType(ESearchType type);
|
||||
ESearchType getSearchType() { return mSearchType; }
|
||||
void setFilterCreator(EFilterCreatorType type);
|
||||
EFilterCreatorType getFilterCreator() { return mFilterCreatorType; }
|
||||
|
||||
void setFilterSubString(const std::string& string);
|
||||
const std::string& getFilterSubString(BOOL trim = FALSE) const;
|
||||
|
|
@ -243,8 +245,9 @@ public:
|
|||
// +-------------------------------------------------------------------+
|
||||
// + Presentation
|
||||
// +-------------------------------------------------------------------+
|
||||
void setShowFolderState( EFolderShow state);
|
||||
EFolderShow getShowFolderState() const;
|
||||
void setShowFolderState( EFolderShow state);
|
||||
EFolderShow getShowFolderState() const;
|
||||
EFilterCreatorType getFilterCreatorType() const;
|
||||
|
||||
void setEmptyLookupMessage(const std::string& message);
|
||||
std::string getEmptyLookupMessage() const;
|
||||
|
|
@ -324,7 +327,6 @@ private:
|
|||
std::string mEmptyLookupMessage;
|
||||
|
||||
ESearchType mSearchType;
|
||||
EFilterCreatorType mFilterCreatorType;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -885,7 +885,7 @@ void LLFloaterInventoryFinder::updateElementsFromFilter()
|
|||
U32 hours = mFilter->getHoursAgo();
|
||||
U32 date_search_direction = mFilter->getDateSearchDirection();
|
||||
|
||||
LLInventoryFilter::EFilterCreatorType filter_creator = mFilter->getFilterCreator();
|
||||
LLInventoryFilter::EFilterCreatorType filter_creator = mFilter->getFilterCreatorType();
|
||||
bool show_created_by_me = ((filter_creator == LLInventoryFilter::FILTERCREATOR_ALL) || (filter_creator == LLInventoryFilter::FILTERCREATOR_SELF));
|
||||
bool show_created_by_others = ((filter_creator == LLInventoryFilter::FILTERCREATOR_ALL) || (filter_creator == LLInventoryFilter::FILTERCREATOR_OTHERS));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue