diff --git a/eeschema/eeredraw.cpp b/eeschema/eeredraw.cpp index a36d297931..2549a80c70 100644 --- a/eeschema/eeredraw.cpp +++ b/eeschema/eeredraw.cpp @@ -72,6 +72,19 @@ void SCH_EDIT_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg ) TraceWorkSheet( DC, GetScreen(), g_DrawDefaultLineThickness ); +#ifdef USE_WX_OVERLAY + if( IsShown() ) + { + m_overlay.Reset(); + wxDCOverlay overlaydc( m_overlay, (wxWindowDC*)DC ); + overlaydc.Clear(); + /* TODO: Investigate why toolbars are affected - to be searched in wxWidgets */ + m_mainToolBar->Refresh(); + m_drawToolBar->Refresh(); + m_optionsToolBar->Refresh(); + } +#endif + if( m_canvas->IsMouseCaptured() ) m_canvas->CallMouseCapture( DC, wxDefaultPosition, false ); diff --git a/eeschema/lib_draw_item.cpp b/eeschema/lib_draw_item.cpp index ee0e3e23e7..5a29a0daf4 100644 --- a/eeschema/lib_draw_item.cpp +++ b/eeschema/lib_draw_item.cpp @@ -125,7 +125,7 @@ void LIB_ITEM::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int color = GetDefaultColor(); m_Fill = NO_FILL; - +#ifndef USE_WX_OVERLAY // Erase the old items using the previous attributes. if( m_eraseLastDrawItem ) { @@ -133,7 +133,7 @@ void LIB_ITEM::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, drawEditGraphics( aPanel->GetClipBox(), aDC, color ); drawGraphic( aPanel, aDC, wxPoint( 0, 0 ), color, g_XorMode, aData, aTransform ); } - +#endif // Calculate the new attributes at the current cursor position. calcEdit( aOffset ); diff --git a/eeschema/schedit.cpp b/eeschema/schedit.cpp index 55fbc154ec..a549a3a673 100644 --- a/eeschema/schedit.cpp +++ b/eeschema/schedit.cpp @@ -598,10 +598,12 @@ static void moveItem( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPositio wxCHECK_RET( (item != NULL), wxT( "Cannot move invalid schematic item." ) ); +#ifndef USE_WX_OVERLAY // Erase the current item at its current position. if( aErase ) item->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode ); +#endif item->SetPosition( screen->GetCrossHairPosition() ); // Draw the item item at it's new position. @@ -671,7 +673,10 @@ void SCH_EDIT_FRAME::MoveItem( SCH_ITEM* aItem, wxDC* aDC ) } aItem->SetFlags( IS_MOVED ); - +#ifdef USE_WX_OVERLAY + this->Refresh(); + this->Update(); +#endif m_canvas->CrossHairOff( aDC ); if( aItem->Type() != SCH_SHEET_PIN_T )