Remove long-dead vestiges of DRC checks on Edit Tracks and Vias.
This commit is contained in:
parent
108936079b
commit
cfdf818878
|
@ -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 );
|
||||
|
@ -370,7 +358,7 @@ bool DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::TransferDataFromWindow()
|
|||
m_parent->GetCanvas()->GetView()->Update( segment );
|
||||
}
|
||||
|
||||
return !m_failedDRC;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include <drc/drc.h>
|
||||
|
||||
|
||||
int PCB_EDIT_FRAME::SetTrackSegmentWidth( TRACK* aTrackItem,
|
||||
void PCB_EDIT_FRAME::SetTrackSegmentWidth( TRACK* aTrackItem,
|
||||
PICKED_ITEMS_LIST* aItemsListPicker,
|
||||
bool aUseNetclassValue )
|
||||
{
|
||||
|
@ -119,12 +119,6 @@ int PCB_EDIT_FRAME::SetTrackSegmentWidth( TRACK* aTrackItem,
|
|||
via->SetDrillDefault();
|
||||
}
|
||||
}
|
||||
|
||||
return TRACK_ACTION_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
return TRACK_ACTION_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -67,16 +67,6 @@ enum LAST_PATH_TYPE : unsigned int;
|
|||
|
||||
namespace PCB { struct IFACE; } // KIFACE_I is in pcbnew.cpp
|
||||
|
||||
/**
|
||||
* Enum to signify the result of editing tracks and vias
|
||||
*/
|
||||
enum TRACK_ACTION_RESULT
|
||||
{
|
||||
TRACK_ACTION_DRC_ERROR = -1,//!< TRACK_ACTION_DRC_ERROR - Track not changed to to DRC
|
||||
TRACK_ACTION_SUCCESS, //!< TRACK_ACTION_SUCCESS - Track changed successfully
|
||||
TRACK_ACTION_NONE //!< TRACK_ACTION_NONE - Nothing to change
|
||||
};
|
||||
|
||||
/**
|
||||
* PCB_EDIT_FRAME
|
||||
* is the main frame for Pcbnew.
|
||||
|
@ -810,11 +800,8 @@ public:
|
|||
* (can be NULL)
|
||||
* @param aUseNetclassValue = true to use NetClass value, false to use
|
||||
* current designSettings value
|
||||
* @return 0 if items successfully changed,
|
||||
* -1 if there was a DRC error,
|
||||
* 1 if items were changed successfully
|
||||
*/
|
||||
int SetTrackSegmentWidth( TRACK* aTrackItem,
|
||||
void SetTrackSegmentWidth( TRACK* aTrackItem,
|
||||
PICKED_ITEMS_LIST* aItemsListPicker,
|
||||
bool aUseNetclassValue );
|
||||
|
||||
|
|
Loading…
Reference in New Issue