Loading pcbnew/autorouter/autoplac.cpp +6 −2 Original line number Original line Diff line number Diff line Loading @@ -673,18 +673,21 @@ int PCB_EDIT_FRAME::GetOptimalModulePlacement( MODULE* aModule, wxDC* aDC ) for( ; CurrPosition.y < RoutingMatrix.m_BrdBox.GetBottom() - fy; for( ; CurrPosition.y < RoutingMatrix.m_BrdBox.GetBottom() - fy; CurrPosition.y += RoutingMatrix.m_GridRouting ) CurrPosition.y += RoutingMatrix.m_GridRouting ) { { #ifndef USE_WX_OVERLAY /* Erase traces. */ /* Erase traces. */ DrawModuleOutlines( m_canvas, aDC, aModule ); DrawModuleOutlines( m_canvas, aDC, aModule ); if( showRat ) if( showRat ) Compute_Ratsnest_PlaceModule( aDC ); Compute_Ratsnest_PlaceModule( aDC ); #endif showRat = 0; showRat = 0; aModule->m_BoundaryBox.SetX( ox + CurrPosition.x ); aModule->m_BoundaryBox.SetX( ox + CurrPosition.x ); aModule->m_BoundaryBox.SetY( oy + CurrPosition.y ); aModule->m_BoundaryBox.SetY( oy + CurrPosition.y ); g_Offset_Module.y = cy - CurrPosition.y; g_Offset_Module.y = cy - CurrPosition.y; #ifndef USE_WX_OVERLAY DrawModuleOutlines( m_canvas, aDC, aModule ); DrawModuleOutlines( m_canvas, aDC, aModule ); #endif keepOut = TstModuleOnBoard( GetBoard(), aModule, TstOtherSide ); keepOut = TstModuleOnBoard( GetBoard(), aModule, TstOtherSide ); if( keepOut >= 0 ) // i.e. if the module can be put here if( keepOut >= 0 ) // i.e. if the module can be put here Loading Loading @@ -918,11 +921,12 @@ double PCB_EDIT_FRAME::Compute_Ratsnest_PlaceModule( wxDC* DC ) start = pt_local_rats_nest->m_PadStart->GetPosition() - g_Offset_Module; start = pt_local_rats_nest->m_PadStart->GetPosition() - g_Offset_Module; end = pt_local_rats_nest->m_PadEnd->GetPosition(); end = pt_local_rats_nest->m_PadEnd->GetPosition(); #ifndef USE_WX_OVERLAY if( AutoPlaceShowAll ) if( AutoPlaceShowAll ) { { GRLine( m_canvas->GetClipBox(), DC, start, end, 0, color ); GRLine( m_canvas->GetClipBox(), DC, start, end, 0, color ); } } #endif /* Cost of the ratsnest. */ /* Cost of the ratsnest. */ dx = end.x - start.x; dx = end.x - start.x; dy = end.y - start.y; dy = end.y - start.y; Loading pcbnew/board_undo_redo.cpp +4 −0 Original line number Original line Diff line number Diff line Loading @@ -352,6 +352,10 @@ void PCB_EDIT_FRAME::SaveCopyInUndoList( BOARD_ITEM* aItem, case UR_NEW: case UR_NEW: case UR_DELETED: case UR_DELETED: #ifdef USE_WX_OVERLAY #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(); m_canvas->Refresh(); #endif #endif case UR_MOVED: case UR_MOVED: Loading pcbnew/editedge.cpp +4 −0 Original line number Original line Diff line number Diff line Loading @@ -225,6 +225,10 @@ static void Abort_EditEdge( EDA_DRAW_PANEL* Panel, wxDC* DC ) Segment->Draw( Panel, DC, GR_OR ); Segment->Draw( Panel, DC, GR_OR ); } } #ifdef USE_WX_OVERLAY Panel->Refresh(); #endif Panel->SetMouseCapture( NULL, NULL ); Panel->SetMouseCapture( NULL, NULL ); ( (PCB_EDIT_FRAME*) Panel->GetParent() )->SetCurItem( NULL ); ( (PCB_EDIT_FRAME*) Panel->GetParent() )->SetCurItem( NULL ); } } Loading Loading
pcbnew/autorouter/autoplac.cpp +6 −2 Original line number Original line Diff line number Diff line Loading @@ -673,18 +673,21 @@ int PCB_EDIT_FRAME::GetOptimalModulePlacement( MODULE* aModule, wxDC* aDC ) for( ; CurrPosition.y < RoutingMatrix.m_BrdBox.GetBottom() - fy; for( ; CurrPosition.y < RoutingMatrix.m_BrdBox.GetBottom() - fy; CurrPosition.y += RoutingMatrix.m_GridRouting ) CurrPosition.y += RoutingMatrix.m_GridRouting ) { { #ifndef USE_WX_OVERLAY /* Erase traces. */ /* Erase traces. */ DrawModuleOutlines( m_canvas, aDC, aModule ); DrawModuleOutlines( m_canvas, aDC, aModule ); if( showRat ) if( showRat ) Compute_Ratsnest_PlaceModule( aDC ); Compute_Ratsnest_PlaceModule( aDC ); #endif showRat = 0; showRat = 0; aModule->m_BoundaryBox.SetX( ox + CurrPosition.x ); aModule->m_BoundaryBox.SetX( ox + CurrPosition.x ); aModule->m_BoundaryBox.SetY( oy + CurrPosition.y ); aModule->m_BoundaryBox.SetY( oy + CurrPosition.y ); g_Offset_Module.y = cy - CurrPosition.y; g_Offset_Module.y = cy - CurrPosition.y; #ifndef USE_WX_OVERLAY DrawModuleOutlines( m_canvas, aDC, aModule ); DrawModuleOutlines( m_canvas, aDC, aModule ); #endif keepOut = TstModuleOnBoard( GetBoard(), aModule, TstOtherSide ); keepOut = TstModuleOnBoard( GetBoard(), aModule, TstOtherSide ); if( keepOut >= 0 ) // i.e. if the module can be put here if( keepOut >= 0 ) // i.e. if the module can be put here Loading Loading @@ -918,11 +921,12 @@ double PCB_EDIT_FRAME::Compute_Ratsnest_PlaceModule( wxDC* DC ) start = pt_local_rats_nest->m_PadStart->GetPosition() - g_Offset_Module; start = pt_local_rats_nest->m_PadStart->GetPosition() - g_Offset_Module; end = pt_local_rats_nest->m_PadEnd->GetPosition(); end = pt_local_rats_nest->m_PadEnd->GetPosition(); #ifndef USE_WX_OVERLAY if( AutoPlaceShowAll ) if( AutoPlaceShowAll ) { { GRLine( m_canvas->GetClipBox(), DC, start, end, 0, color ); GRLine( m_canvas->GetClipBox(), DC, start, end, 0, color ); } } #endif /* Cost of the ratsnest. */ /* Cost of the ratsnest. */ dx = end.x - start.x; dx = end.x - start.x; dy = end.y - start.y; dy = end.y - start.y; Loading
pcbnew/board_undo_redo.cpp +4 −0 Original line number Original line Diff line number Diff line Loading @@ -352,6 +352,10 @@ void PCB_EDIT_FRAME::SaveCopyInUndoList( BOARD_ITEM* aItem, case UR_NEW: case UR_NEW: case UR_DELETED: case UR_DELETED: #ifdef USE_WX_OVERLAY #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(); m_canvas->Refresh(); #endif #endif case UR_MOVED: case UR_MOVED: Loading
pcbnew/editedge.cpp +4 −0 Original line number Original line Diff line number Diff line Loading @@ -225,6 +225,10 @@ static void Abort_EditEdge( EDA_DRAW_PANEL* Panel, wxDC* DC ) Segment->Draw( Panel, DC, GR_OR ); Segment->Draw( Panel, DC, GR_OR ); } } #ifdef USE_WX_OVERLAY Panel->Refresh(); #endif Panel->SetMouseCapture( NULL, NULL ); Panel->SetMouseCapture( NULL, NULL ); ( (PCB_EDIT_FRAME*) Panel->GetParent() )->SetCurItem( NULL ); ( (PCB_EDIT_FRAME*) Panel->GetParent() )->SetCurItem( NULL ); } } Loading