Area Search: Add MOTP filter.
parent
c513386919
commit
14362f5a13
|
|
@ -98,6 +98,7 @@ FSAreaSearch::FSAreaSearch(const LLSD& key) :
|
|||
mFilterLocked(false),
|
||||
mFilterPhantom(false),
|
||||
mFilterAttachment(false),
|
||||
mFilterMOTP(false),
|
||||
mFilterDistance(false),
|
||||
mFilterDistanceMin(0),
|
||||
mFilterDistanceMax(999999),
|
||||
|
|
@ -652,6 +653,25 @@ void FSAreaSearch::matchObject(FSObjectProperties& details, LLViewerObject* obje
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (mFilterMOTP)
|
||||
{
|
||||
bool motp = false;
|
||||
U8 texture_count = objectp->getNumTEs();
|
||||
for(U8 i = 0; i < texture_count; i++)
|
||||
{
|
||||
if(objectp->getTE(i)->hasMedia())
|
||||
{
|
||||
motp = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(!motp)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// Find text
|
||||
|
|
@ -1537,6 +1557,9 @@ BOOL FSPanelAreaSearchFilter::postBuild()
|
|||
mSpinDistanceMaxValue= getChild<LLSpinCtrl>("max_distance");
|
||||
mSpinDistanceMaxValue->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitSpin, this));
|
||||
|
||||
mCheckboxMOTP = getChild<LLCheckBoxCtrl>("filter_motp");
|
||||
mCheckboxMOTP->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this));
|
||||
|
||||
return LLPanel::postBuild();
|
||||
}
|
||||
|
||||
|
|
@ -1550,6 +1573,7 @@ void FSPanelAreaSearchFilter::onCommitCheckbox()
|
|||
mFSAreaSearch->setFilterPhantom(mCheckboxPhantom->get());
|
||||
mFSAreaSearch->setFilterForSale(mCheckboxForSale->get());
|
||||
mFSAreaSearch->setFilterDistance(mCheckboxDistance->get());
|
||||
mFSAreaSearch->setFilterMOTP(mCheckboxMOTP->get());
|
||||
|
||||
if (mCheckboxExcludePhysics->get())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -123,6 +123,7 @@ public:
|
|||
void setFilterTemporary(bool b) { mFilterTemporary = b; }
|
||||
void setFilterPhantom(bool b) { mFilterPhantom = b; }
|
||||
void setFilterAttachment(bool b) { mFilterAttachment = b; }
|
||||
void setFilterMOTP(bool b) { mFilterMOTP = b; }
|
||||
|
||||
void setRegexSearch(bool b) { mRegexSearch = b; }
|
||||
void setBeacons(bool b) { mBeacons = b; }
|
||||
|
|
@ -205,6 +206,7 @@ private:
|
|||
bool mFilterTemporary;
|
||||
bool mFilterPhantom;
|
||||
bool mFilterAttachment;
|
||||
bool mFilterMOTP;
|
||||
|
||||
bool mFilterForSale;
|
||||
S32 mFilterForSaleMin;
|
||||
|
|
@ -330,6 +332,7 @@ private:
|
|||
LLCheckBoxCtrl* mCheckboxTemporary;
|
||||
LLCheckBoxCtrl* mCheckboxLocked;
|
||||
LLCheckBoxCtrl* mCheckboxPhantom;
|
||||
LLCheckBoxCtrl* mCheckboxMOTP;
|
||||
LLCheckBoxCtrl* mCheckboxDistance;
|
||||
LLSpinCtrl* mSpinDistanceMinValue;
|
||||
LLSpinCtrl* mSpinDistanceMaxValue;
|
||||
|
|
|
|||
|
|
@ -329,6 +329,13 @@
|
|||
label="Attachment"
|
||||
left_pad="0"
|
||||
width="80"/>
|
||||
<check_box
|
||||
follows="top|left"
|
||||
layout="topleft"
|
||||
name="filter_motp"
|
||||
label="MOTP"
|
||||
left_pad="0"
|
||||
width="80"/>
|
||||
<check_box
|
||||
follows="top|left"
|
||||
height="20"
|
||||
|
|
|
|||
Loading…
Reference in New Issue