diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 2f66b69456..ce97767a2a 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -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; } diff --git a/pcbnew/collectors.cpp b/pcbnew/collectors.cpp index 096df2834f..7614be6223 100644 --- a/pcbnew/collectors.cpp +++ b/pcbnew/collectors.cpp @@ -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; diff --git a/pcbnew/collectors.h b/pcbnew/collectors.h index bb2bdb77c7..9c06c021ea 100644 --- a/pcbnew/collectors.h +++ b/pcbnew/collectors.h @@ -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; } };