Cleanup.
This commit is contained in:
parent
30ec895c96
commit
13d61e4b2b
|
@ -380,8 +380,6 @@ void FOOTPRINT_EDIT_FRAME::SetDesignSettings( const BOARD_DESIGN_SETTINGS& aSett
|
||||||
const PCB_PLOT_PARAMS& FOOTPRINT_EDIT_FRAME::GetPlotSettings() const
|
const PCB_PLOT_PARAMS& FOOTPRINT_EDIT_FRAME::GetPlotSettings() const
|
||||||
{
|
{
|
||||||
// get the settings from the parent editor, not our BOARD.
|
// get the settings from the parent editor, not our BOARD.
|
||||||
|
|
||||||
// @todo(DICK) change the routing to some default or the board directly, parent may not exist
|
|
||||||
PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) Kiway().Player( FRAME_PCB, true );
|
PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) Kiway().Player( FRAME_PCB, true );
|
||||||
wxASSERT( parentFrame );
|
wxASSERT( parentFrame );
|
||||||
|
|
||||||
|
@ -392,8 +390,6 @@ const PCB_PLOT_PARAMS& FOOTPRINT_EDIT_FRAME::GetPlotSettings() const
|
||||||
void FOOTPRINT_EDIT_FRAME::SetPlotSettings( const PCB_PLOT_PARAMS& aSettings )
|
void FOOTPRINT_EDIT_FRAME::SetPlotSettings( const PCB_PLOT_PARAMS& aSettings )
|
||||||
{
|
{
|
||||||
// set the settings into parent editor, not our BOARD.
|
// set the settings into parent editor, not our BOARD.
|
||||||
|
|
||||||
// @todo(DICK) change the routing to some default or the board directly, parent may not exist
|
|
||||||
PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) Kiway().Player( FRAME_PCB, true );
|
PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) Kiway().Player( FRAME_PCB, true );
|
||||||
wxASSERT( parentFrame );
|
wxASSERT( parentFrame );
|
||||||
|
|
||||||
|
|
|
@ -776,9 +776,6 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const
|
||||||
if( aBoard->Tracks().size() )
|
if( aBoard->Tracks().size() )
|
||||||
m_out->Print( 0, "\n" );
|
m_out->Print( 0, "\n" );
|
||||||
|
|
||||||
/// @todo Add warning here that the old segment filed zones are no longer supported and
|
|
||||||
/// will not be saved.
|
|
||||||
|
|
||||||
// Save the polygon (which are the newer technology) zones.
|
// Save the polygon (which are the newer technology) zones.
|
||||||
for( int i = 0; i < aBoard->GetAreaCount(); ++i )
|
for( int i = 0; i < aBoard->GetAreaCount(); ++i )
|
||||||
Format( aBoard->GetArea( i ), aNestLevel );
|
Format( aBoard->GetArea( i ), aNestLevel );
|
||||||
|
|
|
@ -41,7 +41,6 @@ public:
|
||||||
int InlineDrag( const TOOL_EVENT& aEvent );
|
int InlineDrag( const TOOL_EVENT& aEvent );
|
||||||
|
|
||||||
int SelectCopperLayerPair( const TOOL_EVENT& aEvent );
|
int SelectCopperLayerPair( const TOOL_EVENT& aEvent );
|
||||||
// TODO make this private?
|
|
||||||
int DpDimensionsDialog( const TOOL_EVENT& aEvent );
|
int DpDimensionsDialog( const TOOL_EVENT& aEvent );
|
||||||
int SettingsDialog( const TOOL_EVENT& aEvent );
|
int SettingsDialog( const TOOL_EVENT& aEvent );
|
||||||
int CustomTrackWidthDialog( const TOOL_EVENT& aEvent );
|
int CustomTrackWidthDialog( const TOOL_EVENT& aEvent );
|
||||||
|
|
|
@ -756,7 +756,14 @@ int DRAWING_TOOL::PlaceImportedGraphics( const TOOL_EVENT& aEvent )
|
||||||
m_frame->GetCanvas()->SetCurrentCursor( wxCURSOR_ARROW );
|
m_frame->GetCanvas()->SetCurrentCursor( wxCURSOR_ARROW );
|
||||||
cursorPos = m_controls->GetCursorPosition();
|
cursorPos = m_controls->GetCursorPosition();
|
||||||
|
|
||||||
if( evt->IsMotion() )
|
if( evt->IsCancelInteractive() || evt->IsActivate() )
|
||||||
|
{
|
||||||
|
preview.FreeItems();
|
||||||
|
|
||||||
|
m_frame->PopTool();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if( evt->IsMotion() )
|
||||||
{
|
{
|
||||||
delta = cursorPos - firstItem->GetPosition();
|
delta = cursorPos - firstItem->GetPosition();
|
||||||
|
|
||||||
|
@ -768,7 +775,7 @@ int DRAWING_TOOL::PlaceImportedGraphics( const TOOL_EVENT& aEvent )
|
||||||
else if( evt->Category() == TC_COMMAND )
|
else if( evt->Category() == TC_COMMAND )
|
||||||
{
|
{
|
||||||
// TODO it should be handled by EDIT_TOOL, so add items and select?
|
// TODO it should be handled by EDIT_TOOL, so add items and select?
|
||||||
if( evt->IsCancelInteractive() )
|
if( TOOL_EVT_UTILS::IsRotateToolEvt( *evt ) )
|
||||||
{
|
{
|
||||||
const auto rotationPoint = (wxPoint) cursorPos;
|
const auto rotationPoint = (wxPoint) cursorPos;
|
||||||
const auto rotationAngle = TOOL_EVT_UTILS::GetEventRotationAngle( *m_frame, *evt );
|
const auto rotationAngle = TOOL_EVT_UTILS::GetEventRotationAngle( *m_frame, *evt );
|
||||||
|
@ -785,13 +792,6 @@ int DRAWING_TOOL::PlaceImportedGraphics( const TOOL_EVENT& aEvent )
|
||||||
|
|
||||||
m_view->Update( &preview );
|
m_view->Update( &preview );
|
||||||
}
|
}
|
||||||
else if( evt->IsCancelInteractive() || evt->IsActivate() )
|
|
||||||
{
|
|
||||||
preview.FreeItems();
|
|
||||||
|
|
||||||
m_frame->PopTool();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if( evt->IsClick( BUT_RIGHT ) )
|
else if( evt->IsClick( BUT_RIGHT ) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -115,15 +115,6 @@ void MICROWAVE_TOOL::createInductorBetween( const VECTOR2I& aStart, const VECTOR
|
||||||
auto inductorModule = std::unique_ptr<MODULE>( CreateMicrowaveInductor( pattern, &frame,
|
auto inductorModule = std::unique_ptr<MODULE>( CreateMicrowaveInductor( pattern, &frame,
|
||||||
errorMessage ) );
|
errorMessage ) );
|
||||||
|
|
||||||
if( inductorModule )
|
|
||||||
{
|
|
||||||
// legacy mode tools add to the board
|
|
||||||
// so remove it and add it back with the commit object
|
|
||||||
// this has to happen, even if we don't end up storing the module
|
|
||||||
// @todo LEGACY
|
|
||||||
board()->Remove( inductorModule.get() );
|
|
||||||
}
|
|
||||||
|
|
||||||
// on any error, report if we can
|
// on any error, report if we can
|
||||||
if ( !inductorModule || !errorMessage.IsEmpty() )
|
if ( !inductorModule || !errorMessage.IsEmpty() )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue