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;
|
PCB_EDIT_FRAME* m_parent;
|
||||||
BOARD* m_brd;
|
BOARD* m_brd;
|
||||||
int* m_originalColWidths;
|
int* m_originalColWidths;
|
||||||
bool m_failedDRC;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS( PCB_EDIT_FRAME* aParent );
|
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 )
|
for( int i = 0; i < m_netclassGrid->GetNumberCols(); ++i )
|
||||||
m_originalColWidths[ i ] = m_netclassGrid->GetColSize( i );
|
m_originalColWidths[ i ] = m_netclassGrid->GetColSize( i );
|
||||||
|
|
||||||
m_failedDRC = false;
|
|
||||||
|
|
||||||
buildFilterLists();
|
buildFilterLists();
|
||||||
|
|
||||||
m_parent->UpdateTrackWidthSelectBox( m_trackWidthSelectBox, false );
|
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_trackWidthSelectBox->Enable( m_setToSpecifiedValues->GetValue() );
|
||||||
m_viaSizesSelectBox->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();
|
unsigned int prevTrackWidthIndex = brdSettings.GetTrackWidthIndex();
|
||||||
brdSettings.SetTrackWidthIndex( (unsigned) m_trackWidthSelectBox->GetSelection() );
|
brdSettings.SetTrackWidthIndex( (unsigned) m_trackWidthSelectBox->GetSelection() );
|
||||||
|
|
||||||
if( m_parent->SetTrackSegmentWidth( aItem, aUndoList, false ) == TRACK_ACTION_DRC_ERROR )
|
m_parent->SetTrackSegmentWidth( aItem, aUndoList, false );
|
||||||
m_failedDRC = true;
|
|
||||||
|
|
||||||
brdSettings.SetTrackWidthIndex( prevTrackWidthIndex );
|
brdSettings.SetTrackWidthIndex( prevTrackWidthIndex );
|
||||||
}
|
}
|
||||||
|
@ -295,8 +285,7 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::processItem( PICKED_ITEMS_LIST* aUndoLi
|
||||||
unsigned int prevViaSizeIndex = brdSettings.GetViaSizeIndex();
|
unsigned int prevViaSizeIndex = brdSettings.GetViaSizeIndex();
|
||||||
brdSettings.SetViaSizeIndex( (unsigned) m_viaSizesSelectBox->GetSelection() );
|
brdSettings.SetViaSizeIndex( (unsigned) m_viaSizesSelectBox->GetSelection() );
|
||||||
|
|
||||||
if( m_parent->SetTrackSegmentWidth( aItem, aUndoList, false ) == TRACK_ACTION_DRC_ERROR )
|
m_parent->SetTrackSegmentWidth( aItem, aUndoList, false );
|
||||||
m_failedDRC = true;
|
|
||||||
|
|
||||||
brdSettings.SetViaSizeIndex( prevViaSizeIndex );
|
brdSettings.SetViaSizeIndex( prevViaSizeIndex );
|
||||||
}
|
}
|
||||||
|
@ -316,8 +305,7 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::processItem( PICKED_ITEMS_LIST* aUndoLi
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( m_parent->SetTrackSegmentWidth( aItem, aUndoList, true ) == TRACK_ACTION_DRC_ERROR )
|
m_parent->SetTrackSegmentWidth( aItem, aUndoList, true );
|
||||||
m_failedDRC = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_brd->OnItemChanged( aItem );
|
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()
|
bool DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::TransferDataFromWindow()
|
||||||
{
|
{
|
||||||
PICKED_ITEMS_LIST itemsListPicker;
|
PICKED_ITEMS_LIST itemsListPicker;
|
||||||
wxBusyCursor dummy;
|
wxBusyCursor dummy;
|
||||||
|
|
||||||
// Examine segments
|
// Examine segments
|
||||||
for( auto segment : m_brd->Tracks() )
|
for( auto segment : m_brd->Tracks() )
|
||||||
|
@ -370,7 +358,7 @@ bool DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::TransferDataFromWindow()
|
||||||
m_parent->GetCanvas()->GetView()->Update( segment );
|
m_parent->GetCanvas()->GetView()->Update( segment );
|
||||||
}
|
}
|
||||||
|
|
||||||
return !m_failedDRC;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -30,9 +30,9 @@
|
||||||
#include <drc/drc.h>
|
#include <drc/drc.h>
|
||||||
|
|
||||||
|
|
||||||
int PCB_EDIT_FRAME::SetTrackSegmentWidth( TRACK* aTrackItem,
|
void PCB_EDIT_FRAME::SetTrackSegmentWidth( TRACK* aTrackItem,
|
||||||
PICKED_ITEMS_LIST* aItemsListPicker,
|
PICKED_ITEMS_LIST* aItemsListPicker,
|
||||||
bool aUseNetclassValue )
|
bool aUseNetclassValue )
|
||||||
{
|
{
|
||||||
int initial_width;
|
int initial_width;
|
||||||
int new_width;
|
int new_width;
|
||||||
|
@ -119,12 +119,6 @@ int PCB_EDIT_FRAME::SetTrackSegmentWidth( TRACK* aTrackItem,
|
||||||
via->SetDrillDefault();
|
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
|
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
|
* PCB_EDIT_FRAME
|
||||||
* is the main frame for Pcbnew.
|
* is the main frame for Pcbnew.
|
||||||
|
@ -810,11 +800,8 @@ public:
|
||||||
* (can be NULL)
|
* (can be NULL)
|
||||||
* @param aUseNetclassValue = true to use NetClass value, false to use
|
* @param aUseNetclassValue = true to use NetClass value, false to use
|
||||||
* current designSettings value
|
* 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,
|
PICKED_ITEMS_LIST* aItemsListPicker,
|
||||||
bool aUseNetclassValue );
|
bool aUseNetclassValue );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue