This commit is contained in:
Guillaume Simard 2011-12-14 16:35:03 -06:00 committed by Dick Hollenbeck
parent 6767a0b2a3
commit cc70c1a463
3 changed files with 39 additions and 0 deletions

View File

@ -430,6 +430,8 @@ GENERAL_COLLECTORS_GUIDE PCB_BASE_FRAME::GetCollectorsGuide()
guide.SetIgnoreModulesOnCmp( ! m_Pcb->IsElementVisible( MOD_FR_VISIBLE ) );
guide.SetIgnorePadsOnBack( ! m_Pcb->IsElementVisible( PAD_BK_VISIBLE ) );
guide.SetIgnorePadsOnFront( ! m_Pcb->IsElementVisible( PAD_FR_VISIBLE ) );
guide.SetIgnoreModulesVals( ! m_Pcb->IsElementVisible( MOD_VALUES_VISIBLE ) );
guide.SetIgnoreModulesRefs( ! m_Pcb->IsElementVisible( MOD_REFERENCES_VISIBLE ) );
return guide;
}

View File

@ -280,6 +280,12 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, const void* testDa
if( m_Guide->IgnoreMTextsOnCmp() && module->GetLayer()==LAYER_N_FRONT )
goto exit;
if( m_Guide->IgnoreModulesVals() && item == module->m_Value )
goto exit;
if( m_Guide->IgnoreModulesRefs() && item == module->m_Reference )
goto exit;
}
break;

View File

@ -175,6 +175,18 @@ public:
return IgnorePadsOnFront() && IgnorePadsOnBack();
}
/**
* Function IgnoreModulesVals
* @return bool - true if should ignore modules values.
*/
virtual bool IgnoreModulesVals() const = 0;
/**
* Function IgnoreModulesRefs
* @return bool - true if should ignore module references.
*/
virtual bool IgnoreModulesRefs() const = 0;
/**
* Function UseHitTesting
* @return bool - true if Inspect() should use BOARD_ITEM::HitTest()
@ -383,6 +395,8 @@ private:
bool m_IgnoreModulesOnCmp;
bool m_IgnorePadsOnFront;
bool m_IgnorePadsOnBack;
bool m_IgnoreModulesVals;
bool m_IgnoreModulesRefs;
public:
@ -419,6 +433,9 @@ public:
m_IgnorePadsOnFront = false;
m_IgnorePadsOnBack = false;
m_IgnoreModulesVals = false;
m_IgnoreModulesRefs = false;
}
@ -550,6 +567,20 @@ public:
*/
bool IgnorePadsOnFront() const { return m_IgnorePadsOnFront; }
void SetIgnorePadsOnFront(bool ignore) { m_IgnorePadsOnFront = ignore; }
/**
* Function IgnoreModulesVals
* @return bool - true if should ignore modules values.
*/
bool IgnoreModulesVals() const { return m_IgnoreModulesVals; }
void SetIgnoreModulesVals(bool ignore) { m_IgnoreModulesVals = ignore; }
/**
* Function IgnoreModulesRefs
* @return bool - true if should ignore modules references.
*/
bool IgnoreModulesRefs() const { return m_IgnoreModulesRefs; }
void SetIgnoreModulesRefs(bool ignore) { m_IgnoreModulesRefs = ignore; }
};