diff --git a/pcbnew/autorouter/autoplac.cpp b/pcbnew/autorouter/autoplac.cpp index 21f5571042..8703cd3d1d 100644 --- a/pcbnew/autorouter/autoplac.cpp +++ b/pcbnew/autorouter/autoplac.cpp @@ -673,18 +673,21 @@ int PCB_EDIT_FRAME::GetOptimalModulePlacement( MODULE* aModule, wxDC* aDC ) for( ; CurrPosition.y < RoutingMatrix.m_BrdBox.GetBottom() - fy; CurrPosition.y += RoutingMatrix.m_GridRouting ) { +#ifndef USE_WX_OVERLAY /* Erase traces. */ DrawModuleOutlines( m_canvas, aDC, aModule ); if( showRat ) Compute_Ratsnest_PlaceModule( aDC ); - +#endif showRat = 0; aModule->m_BoundaryBox.SetX( ox + CurrPosition.x ); aModule->m_BoundaryBox.SetY( oy + CurrPosition.y ); g_Offset_Module.y = cy - CurrPosition.y; +#ifndef USE_WX_OVERLAY DrawModuleOutlines( m_canvas, aDC, aModule ); +#endif keepOut = TstModuleOnBoard( GetBoard(), aModule, TstOtherSide ); if( keepOut >= 0 ) // i.e. if the module can be put here @@ -918,11 +921,12 @@ double PCB_EDIT_FRAME::Compute_Ratsnest_PlaceModule( wxDC* DC ) start = pt_local_rats_nest->m_PadStart->GetPosition() - g_Offset_Module; end = pt_local_rats_nest->m_PadEnd->GetPosition(); +#ifndef USE_WX_OVERLAY if( AutoPlaceShowAll ) { GRLine( m_canvas->GetClipBox(), DC, start, end, 0, color ); } - +#endif /* Cost of the ratsnest. */ dx = end.x - start.x; dy = end.y - start.y; diff --git a/pcbnew/board_undo_redo.cpp b/pcbnew/board_undo_redo.cpp index 11ff73c251..8c7b6a7245 100644 --- a/pcbnew/board_undo_redo.cpp +++ b/pcbnew/board_undo_redo.cpp @@ -352,6 +352,10 @@ void PCB_EDIT_FRAME::SaveCopyInUndoList( BOARD_ITEM* aItem, case UR_NEW: case UR_DELETED: #ifdef USE_WX_OVERLAY + // Avoid to redraw when autoplacing + if( aItem->Type() == PCB_MODULE_T ) + if( ((MODULE*)aItem)->GetFlags() & MODULE_to_PLACE ) + break; m_canvas->Refresh(); #endif case UR_MOVED: diff --git a/pcbnew/editedge.cpp b/pcbnew/editedge.cpp index acfba3530a..274a248f81 100644 --- a/pcbnew/editedge.cpp +++ b/pcbnew/editedge.cpp @@ -225,6 +225,10 @@ static void Abort_EditEdge( EDA_DRAW_PANEL* Panel, wxDC* DC ) Segment->Draw( Panel, DC, GR_OR ); } +#ifdef USE_WX_OVERLAY + Panel->Refresh(); +#endif + Panel->SetMouseCapture( NULL, NULL ); ( (PCB_EDIT_FRAME*) Panel->GetParent() )->SetCurItem( NULL ); }