From d24c41ff05f80110120b9a61742c41a7912746df Mon Sep 17 00:00:00 2001 From: dickelbeck Date: Fri, 2 May 2008 06:27:06 +0000 Subject: [PATCH] zone_container xor artifact cleanups --- change_log.txt | 7 ++++--- pcbnew/zones_by_polygon.cpp | 16 +++++++++++----- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/change_log.txt b/change_log.txt index 55b86022ac..c86b09f25c 100644 --- a/change_log.txt +++ b/change_log.txt @@ -9,9 +9,10 @@ email address. 2008-May-2 UPDATE Dick Hollenbeck ================================================================================ +pcbnew - Added ZONE_CONTAINER::GetBoundingBox() and used it to clean up - ZONE_CONTAINER deletion. There is still a problem dragging a zone container - edge that I will not get to. + * Added ZONE_CONTAINER::GetBoundingBox() and used it to clean up + ZONE_CONTAINER deletion. + * For end of edge dragging activity: used full DrawPanel->Refresh() + to clean up all XOR artifacts. 2008-May-1 UPDATE Dick Hollenbeck diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index 4c47295998..2cacb72a36 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -322,15 +322,18 @@ void WinEDA_PcbFrame::End_Move_Zone_Corner_Or_Outlines( wxDC* DC, ZONE_CONTAINER /* Combine zones if possible */ wxBusyCursor dummy; - int layer = zone_container->GetLayer(); +// int layer = zone_container->GetLayer(); - m_Pcb->RedrawAreasOutlines( DrawPanel, DC, GR_XOR, layer ); +// m_Pcb->RedrawAreasOutlines( DrawPanel, DC, GR_XOR, layer ); m_Pcb->AreaPolygonModified( zone_container, true, verbose ); - m_Pcb->RedrawAreasOutlines( DrawPanel, DC, GR_OR, layer ); +// m_Pcb->RedrawAreasOutlines( DrawPanel, DC, GR_OR, layer ); + DrawPanel->Refresh(); + int ii = m_Pcb->GetAreaIndex( zone_container ); // test if zone_container exists if( ii < 0 ) zone_container = NULL; // was removed by combining zones + int error_count = m_Pcb->Test_Drc_Areas_Outlines_To_Areas_Outlines( zone_container, true ); if( error_count ) { @@ -392,7 +395,7 @@ void Abort_Zone_Move_Corner_Or_Outlines( WinEDA_DrawPanel* Panel, wxDC* DC ) WinEDA_PcbFrame* pcbframe = (WinEDA_PcbFrame*) Panel->m_Parent; ZONE_CONTAINER* zone_container = (ZONE_CONTAINER*) pcbframe->GetCurItem(); - zone_container->Draw( Panel, DC, GR_XOR ); +// zone_container->Draw( Panel, DC, GR_XOR ); if( zone_container->m_Flags == IS_MOVED ) { @@ -418,7 +421,10 @@ void Abort_Zone_Move_Corner_Or_Outlines( WinEDA_DrawPanel* Panel, wxDC* DC ) zone_container->m_Poly->MoveCorner( zone_container->m_CornerSelection, pos.x, pos.y ); } } - zone_container->Draw( Panel, DC, GR_XOR ); + +// zone_container->Draw( Panel, DC, GR_XOR ); + Panel->Refresh(); + Panel->ManageCurseur = NULL; Panel->ForceCloseManageCurseur = NULL;