This commit is contained in:
Jeff Young 2019-07-10 00:51:47 +01:00
parent 30ec895c96
commit 13d61e4b2b
5 changed files with 9 additions and 26 deletions

View File

@ -380,8 +380,6 @@ void FOOTPRINT_EDIT_FRAME::SetDesignSettings( const BOARD_DESIGN_SETTINGS& aSett
const PCB_PLOT_PARAMS& FOOTPRINT_EDIT_FRAME::GetPlotSettings() const
{
// 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 );
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 )
{
// 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 );
wxASSERT( parentFrame );

View File

@ -776,9 +776,6 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const
if( aBoard->Tracks().size() )
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.
for( int i = 0; i < aBoard->GetAreaCount(); ++i )
Format( aBoard->GetArea( i ), aNestLevel );

View File

@ -41,7 +41,6 @@ public:
int InlineDrag( const TOOL_EVENT& aEvent );
int SelectCopperLayerPair( const TOOL_EVENT& aEvent );
// TODO make this private?
int DpDimensionsDialog( const TOOL_EVENT& aEvent );
int SettingsDialog( const TOOL_EVENT& aEvent );
int CustomTrackWidthDialog( const TOOL_EVENT& aEvent );

View File

@ -756,7 +756,14 @@ int DRAWING_TOOL::PlaceImportedGraphics( const TOOL_EVENT& aEvent )
m_frame->GetCanvas()->SetCurrentCursor( wxCURSOR_ARROW );
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();
@ -768,7 +775,7 @@ int DRAWING_TOOL::PlaceImportedGraphics( const TOOL_EVENT& aEvent )
else if( evt->Category() == TC_COMMAND )
{
// 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 rotationAngle = TOOL_EVT_UTILS::GetEventRotationAngle( *m_frame, *evt );
@ -785,13 +792,6 @@ int DRAWING_TOOL::PlaceImportedGraphics( const TOOL_EVENT& aEvent )
m_view->Update( &preview );
}
else if( evt->IsCancelInteractive() || evt->IsActivate() )
{
preview.FreeItems();
m_frame->PopTool();
break;
}
}
else if( evt->IsClick( BUT_RIGHT ) )
{

View File

@ -115,15 +115,6 @@ void MICROWAVE_TOOL::createInductorBetween( const VECTOR2I& aStart, const VECTOR
auto inductorModule = std::unique_ptr<MODULE>( CreateMicrowaveInductor( pattern, &frame,
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
if ( !inductorModule || !errorMessage.IsEmpty() )
{