fix TRACK::Copy() usage
This commit is contained in:
parent
fe13569b11
commit
0a420fd3fa
|
@ -390,7 +390,8 @@ static void DrawMovingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool era
|
||||||
int Color;
|
int Color;
|
||||||
BASE_SCREEN* screen = panel->GetScreen();
|
BASE_SCREEN* screen = panel->GetScreen();
|
||||||
|
|
||||||
Color = YELLOW; GRSetDrawMode( DC, g_XorMode );
|
Color = YELLOW;
|
||||||
|
GRSetDrawMode( DC, g_XorMode );
|
||||||
|
|
||||||
/* Effacement ancien cadre */
|
/* Effacement ancien cadre */
|
||||||
if( erase )
|
if( erase )
|
||||||
|
@ -1265,9 +1266,10 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC )
|
||||||
{
|
{
|
||||||
next_track = track->Next();
|
next_track = track->Next();
|
||||||
if( IsSegmentInBox( GetScreen()->BlockLocate, track ) )
|
if( IsSegmentInBox( GetScreen()->BlockLocate, track ) )
|
||||||
{ /* la piste est ici bonne a etre deplacee */
|
{
|
||||||
|
/* la piste est ici bonne a etre deplacee */
|
||||||
m_Pcb->m_Status_Pcb = 0;
|
m_Pcb->m_Status_Pcb = 0;
|
||||||
new_track = track->Copy( 1 );
|
new_track = track->Copy();
|
||||||
new_track->Insert( m_Pcb, NULL );
|
new_track->Insert( m_Pcb, NULL );
|
||||||
new_track->m_Start.x += deltaX; new_track->m_Start.y += deltaY;
|
new_track->m_Start.x += deltaX; new_track->m_Start.y += deltaY;
|
||||||
new_track->m_End.x += deltaX; new_track->m_End.y += deltaY;
|
new_track->m_End.x += deltaX; new_track->m_End.y += deltaY;
|
||||||
|
@ -1291,7 +1293,7 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC )
|
||||||
{
|
{
|
||||||
/* la piste est ici bonne a etre deplacee */
|
/* la piste est ici bonne a etre deplacee */
|
||||||
new_track = new TRACK( m_Pcb );
|
new_track = new TRACK( m_Pcb );
|
||||||
new_track = track->Copy( 1 );
|
new_track = track->Copy();
|
||||||
new_track->Insert( m_Pcb, NULL );
|
new_track->Insert( m_Pcb, NULL );
|
||||||
new_track->m_Start.x += deltaX; new_track->m_Start.y += deltaY;
|
new_track->m_Start.x += deltaX; new_track->m_Start.y += deltaY;
|
||||||
new_track->m_End.x += deltaX; new_track->m_End.y += deltaY;
|
new_track->m_End.x += deltaX; new_track->m_End.y += deltaY;
|
||||||
|
@ -1321,9 +1323,11 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC )
|
||||||
break;
|
break;
|
||||||
if( IsStructInBox( GetScreen()->BlockLocate, PtStruct ) == NULL )
|
if( IsStructInBox( GetScreen()->BlockLocate, PtStruct ) == NULL )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* l'element est ici bon a etre copie */
|
/* l'element est ici bon a etre copie */
|
||||||
DRAWSEGMENT* new_drawsegment = new DRAWSEGMENT( m_Pcb );
|
DRAWSEGMENT* new_drawsegment = new DRAWSEGMENT( m_Pcb );
|
||||||
new_drawsegment->Copy( STRUCT );
|
new_drawsegment->Copy( STRUCT );
|
||||||
|
|
||||||
new_drawsegment->Pnext = m_Pcb->m_Drawings;
|
new_drawsegment->Pnext = m_Pcb->m_Drawings;
|
||||||
new_drawsegment->Pback = m_Pcb;
|
new_drawsegment->Pback = m_Pcb;
|
||||||
m_Pcb->m_Drawings->Pback = new_drawsegment;
|
m_Pcb->m_Drawings->Pback = new_drawsegment;
|
||||||
|
|
Loading…
Reference in New Issue