Commit f966e8a4 authored by dickelbeck's avatar dickelbeck

testing

parent b58c2a05
...@@ -119,11 +119,49 @@ TRACK* WinEDA_PcbFrame::Delete_Segment( wxDC* DC, TRACK* Track ) ...@@ -119,11 +119,49 @@ TRACK* WinEDA_PcbFrame::Delete_Segment( wxDC* DC, TRACK* Track )
current_net_code = Track->GetNet(); current_net_code = Track->GetNet();
#if 0 && !defined(DEBUG) #if 0
Track->Draw( DrawPanel, DC, GR_XOR ); Track->Draw( DrawPanel, DC, GR_XOR );
#else #else
// just redraw the whole drawing so there are no XOR remnants at track intersections.
// redraw the area where the track was
// this rectangle is corrrect
EDA_Rect dirty = Track->GetBoundingBox();
D(printf( "dirty m_Pos=(%d, %d) m_Size=(%d, %d)\n",
dirty.m_Pos.x, dirty.m_Pos.y, dirty.m_Size.x, dirty.m_Size.y );)
int zoom = GetZoom();
wxPoint drwOrig = GetScreen()->m_DrawOrg;
dirty.m_Pos.x = (dirty.m_Pos.x - drwOrig.x) / zoom;
dirty.m_Pos.y = (dirty.m_Pos.y - drwOrig.y) / zoom;
dirty.m_Size.x = (dirty.m_Size.x - drwOrig.x) / zoom;
dirty.m_Size.y = (dirty.m_Size.y - drwOrig.y) / zoom;
D(printf( "dirty scaled zoom=%d m_Pos=(%d, %d) m_Size=(%d, %d) drwOrig=(%d, %d)\n",
zoom,
dirty.m_Pos.x, dirty.m_Pos.y, dirty.m_Size.x, dirty.m_Size.y,
drwOrig.x, drwOrig.y );)
// pass wxRect() via EDA_Rect::operator wxRect() overload
wxRect dirtyR = dirty;
D(printf( "dirtyR m_Pos=(%d, %d) m_Size=(%d, %d)\n",
dirtyR.x, dirtyR.y, dirtyR.width, dirtyR.height );)
/* The calculation for dirtyR is either wrong or the handling of the clipping
rect in OnPaint() is wrong. Enable this line instead of the Refresh() below,
then try deleting a track segment.
DrawPanel->RefreshRect( dirtyR, TRUE );
*/
DrawPanel->Refresh( TRUE ); DrawPanel->Refresh( TRUE );
#endif #endif
SaveItemEfface( Track, 1 ); SaveItemEfface( Track, 1 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment