Annotation: convert annotate unique to use options method
This commit is contained in:
parent
7c979e6375
commit
8db69c2f0d
|
@ -376,7 +376,11 @@ wxString buildFullReference( const SCH_REFERENCE& aItem, int aUnitNumber = -1 )
|
|||
}
|
||||
|
||||
|
||||
void SCH_REFERENCE_LIST::ReannotateDuplicates( const SCH_REFERENCE_LIST& aAdditionalReferences )
|
||||
void SCH_REFERENCE_LIST::ReannotateByOptions( ANNOTATE_ORDER_T aSortOption,
|
||||
ANNOTATE_ALGO_T aAlgoOption,
|
||||
int aStartNumber,
|
||||
const SCH_REFERENCE_LIST& aAdditionalRefs,
|
||||
bool aStartAtCurrent )
|
||||
{
|
||||
SplitReferences();
|
||||
|
||||
|
@ -397,7 +401,14 @@ void SCH_REFERENCE_LIST::ReannotateDuplicates( const SCH_REFERENCE_LIST& aAdditi
|
|||
lockedSymbols[refstr].AddItem( ref );
|
||||
}
|
||||
|
||||
Annotate( false, 0, 0, lockedSymbols, aAdditionalReferences, true );
|
||||
AnnotateByOptions( aSortOption, aAlgoOption, aStartNumber, lockedSymbols, aAdditionalRefs,
|
||||
aStartAtCurrent );
|
||||
}
|
||||
|
||||
|
||||
void SCH_REFERENCE_LIST::ReannotateDuplicates( const SCH_REFERENCE_LIST& aAdditionalReferences )
|
||||
{
|
||||
ReannotateByOptions( UNSORTED, INCREMENTAL_BY_REF, 0, aAdditionalReferences, true );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -337,14 +337,33 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Replace any duplicate reference designators with the next available number after the
|
||||
* present number. Multi-unit symbols are reannotated together.
|
||||
* @brief Forces reannotation of the provided references. Will also reannotate
|
||||
* associated multi-unit symbols.
|
||||
*
|
||||
* @param aSortOption Define the annotation order. See #ANNOTATE_ORDER_T.
|
||||
* @param aAlgoOption Define the annotation style. See #ANNOTATE_ALGO_T.
|
||||
* @param aStartNumber The start number for non-sheet-based annotation styles.
|
||||
* @param aAdditionalReferences Additional references to check for duplicates
|
||||
* @param aStartAtCurrent Use m_numRef for each reference as the start number (overrides
|
||||
* aStartNumber)
|
||||
*/
|
||||
void ReannotateByOptions( ANNOTATE_ORDER_T aSortOption,
|
||||
ANNOTATE_ALGO_T aAlgoOption,
|
||||
int aStartNumber,
|
||||
const SCH_REFERENCE_LIST& aAdditionalRefs,
|
||||
bool aStartAtCurrent );
|
||||
|
||||
/**
|
||||
* Convenience function for the Paste Unique functionality. Do not use as a general
|
||||
* reannotation method.
|
||||
*
|
||||
* Replaces any duplicate reference designators with the next available number after the
|
||||
* present number regardless of configured annotation options.
|
||||
*
|
||||
* Multi-unit symbols are reannotated together.
|
||||
*/
|
||||
void ReannotateDuplicates( const SCH_REFERENCE_LIST& aAdditionalReferences );
|
||||
|
||||
|
||||
/**
|
||||
* Annotate the references by the provided options.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue