|
|
|
@ -67,7 +67,6 @@ private: |
|
|
|
PCB_EDIT_FRAME* m_parent; |
|
|
|
BOARD* m_brd; |
|
|
|
int* m_originalColWidths; |
|
|
|
bool m_failedDRC; |
|
|
|
|
|
|
|
public: |
|
|
|
DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS( PCB_EDIT_FRAME* aParent ); |
|
|
|
@ -113,8 +112,6 @@ DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS( PCB_EDIT |
|
|
|
for( int i = 0; i < m_netclassGrid->GetNumberCols(); ++i ) |
|
|
|
m_originalColWidths[ i ] = m_netclassGrid->GetColSize( i ); |
|
|
|
|
|
|
|
m_failedDRC = false; |
|
|
|
|
|
|
|
buildFilterLists(); |
|
|
|
|
|
|
|
m_parent->UpdateTrackWidthSelectBox( m_trackWidthSelectBox, false ); |
|
|
|
@ -263,12 +260,6 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::OnUpdateUI( wxUpdateUIEvent& ) |
|
|
|
{ |
|
|
|
m_trackWidthSelectBox->Enable( m_setToSpecifiedValues->GetValue() ); |
|
|
|
m_viaSizesSelectBox->Enable( m_setToSpecifiedValues->GetValue() ); |
|
|
|
|
|
|
|
if( m_failedDRC ) |
|
|
|
{ |
|
|
|
m_failedDRC = false; |
|
|
|
DisplayError( this, _( "Some items failed DRC and were not modified." ) ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -285,8 +276,7 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::processItem( PICKED_ITEMS_LIST* aUndoLi |
|
|
|
unsigned int prevTrackWidthIndex = brdSettings.GetTrackWidthIndex(); |
|
|
|
brdSettings.SetTrackWidthIndex( (unsigned) m_trackWidthSelectBox->GetSelection() ); |
|
|
|
|
|
|
|
if( m_parent->SetTrackSegmentWidth( aItem, aUndoList, false ) == TRACK_ACTION_DRC_ERROR ) |
|
|
|
m_failedDRC = true; |
|
|
|
m_parent->SetTrackSegmentWidth( aItem, aUndoList, false ); |
|
|
|
|
|
|
|
brdSettings.SetTrackWidthIndex( prevTrackWidthIndex ); |
|
|
|
} |
|
|
|
@ -295,8 +285,7 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::processItem( PICKED_ITEMS_LIST* aUndoLi |
|
|
|
unsigned int prevViaSizeIndex = brdSettings.GetViaSizeIndex(); |
|
|
|
brdSettings.SetViaSizeIndex( (unsigned) m_viaSizesSelectBox->GetSelection() ); |
|
|
|
|
|
|
|
if( m_parent->SetTrackSegmentWidth( aItem, aUndoList, false ) == TRACK_ACTION_DRC_ERROR ) |
|
|
|
m_failedDRC = true; |
|
|
|
m_parent->SetTrackSegmentWidth( aItem, aUndoList, false ); |
|
|
|
|
|
|
|
brdSettings.SetViaSizeIndex( prevViaSizeIndex ); |
|
|
|
} |
|
|
|
@ -316,8 +305,7 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::processItem( PICKED_ITEMS_LIST* aUndoLi |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
if( m_parent->SetTrackSegmentWidth( aItem, aUndoList, true ) == TRACK_ACTION_DRC_ERROR ) |
|
|
|
m_failedDRC = true; |
|
|
|
m_parent->SetTrackSegmentWidth( aItem, aUndoList, true ); |
|
|
|
} |
|
|
|
|
|
|
|
m_brd->OnItemChanged( aItem ); |
|
|
|
@ -351,7 +339,7 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::visitItem( PICKED_ITEMS_LIST* aUndoList |
|
|
|
bool DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::TransferDataFromWindow() |
|
|
|
{ |
|
|
|
PICKED_ITEMS_LIST itemsListPicker; |
|
|
|
wxBusyCursor dummy; |
|
|
|
wxBusyCursor dummy; |
|
|
|
|
|
|
|
// Examine segments
|
|
|
|
for( auto segment : m_brd->Tracks() ) |
|
|
|
@ -370,7 +358,7 @@ bool DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::TransferDataFromWindow() |
|
|
|
m_parent->GetCanvas()->GetView()->Update( segment ); |
|
|
|
} |
|
|
|
|
|
|
|
return !m_failedDRC; |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|