本文整理汇总了C++中BOARD_ITEM::ViewRelease方法的典型用法代码示例。如果您正苦于以下问题:C++ BOARD_ITEM::ViewRelease方法的具体用法?C++ BOARD_ITEM::ViewRelease怎么用?C++ BOARD_ITEM::ViewRelease使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BOARD_ITEM
的用法示例。
在下文中一共展示了BOARD_ITEM::ViewRelease方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AcceptPcbDelete
void DIALOG_GLOBAL_DELETION::AcceptPcbDelete( )
{
bool gen_rastnest = false;
m_Parent->SetCurItem( NULL );
if( m_DelAlls->GetValue() )
{
m_Parent->Clear_Pcb( true );
}
else
{
if( !IsOK( this, _( "Are you sure you want to delete the selected items?" ) ) )
return;
BOARD* pcb = m_Parent->GetBoard();
PICKED_ITEMS_LIST pickersList;
ITEM_PICKER itemPicker( NULL, UR_DELETED );
BOARD_ITEM* item;
BOARD_ITEM* nextitem;
RN_DATA* ratsnest = pcb->GetRatsnest();
LSET layers_filter = LSET().set();
if( m_rbLayersOption->GetSelection() != 0 ) // Use current layer only
layers_filter = LSET( ToLAYER_ID( m_currentLayer ) );
if( m_DelZones->GetValue() )
{
int area_index = 0;
item = pcb->GetArea( area_index );
while( item )
{
if( layers_filter[item->GetLayer()] )
{
itemPicker.SetItem( item );
pickersList.PushItem( itemPicker );
pcb->Remove( item );
item->ViewRelease();
ratsnest->Remove( item );
gen_rastnest = true;
}
else
{
area_index++;
}
item = pcb->GetArea( area_index );
}
}
if( m_DelDrawings->GetValue() || m_DelBoardEdges->GetValue() )
{
LSET masque_layer;
if( m_DelDrawings->GetValue() )
masque_layer = LSET::AllNonCuMask().set( Edge_Cuts, false );
if( m_DelBoardEdges->GetValue() )
masque_layer.set( Edge_Cuts );
masque_layer &= layers_filter;
for( item = pcb->m_Drawings; item; item = nextitem )
{
nextitem = item->Next();
if( item->Type() == PCB_LINE_T && masque_layer[item->GetLayer()] )
{
itemPicker.SetItem( item );
pickersList.PushItem( itemPicker );
item->ViewRelease();
item->UnLink();
}
}
}
if( m_DelTexts->GetValue() )
{
LSET del_text_layers = layers_filter;
for( item = pcb->m_Drawings; item; item = nextitem )
{
nextitem = item->Next();
if( item->Type() == PCB_TEXT_T && del_text_layers[item->GetLayer()] )
{
itemPicker.SetItem( item );
pickersList.PushItem( itemPicker );
item->ViewRelease();
item->UnLink();
}
}
}
if( m_DelModules->GetValue() )
{
for( item = pcb->m_Modules; item; item = nextitem )
{
//.........这里部分代码省略.........