static void drawMovingBlock( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition, bool aErase ) { BASE_SCREEN* screen = aPanel->GetScreen(); if( aErase ) { if( screen->m_BlockLocate.m_MoveVector.x || screen->m_BlockLocate.m_MoveVector.y ) { screen->m_BlockLocate.Draw( aPanel, aDC, screen->m_BlockLocate.m_MoveVector, GR_XOR, BLOCK_OUTLINE_COLOR ); if( blockDrawItems ) drawPickedItems( aPanel, aDC, screen->m_BlockLocate.m_MoveVector ); } } if( screen->m_BlockLocate.m_State != STATE_BLOCK_STOP ) { screen->m_BlockLocate.m_MoveVector = screen->GetCrossHairPosition() - screen->m_BlockLocate.m_BlockLastCursorPosition; } if( screen->m_BlockLocate.m_MoveVector.x || screen->m_BlockLocate.m_MoveVector.y ) { screen->m_BlockLocate.Draw( aPanel, aDC, screen->m_BlockLocate.m_MoveVector, GR_XOR, BLOCK_OUTLINE_COLOR ); if( blockDrawItems ) drawPickedItems( aPanel, aDC, screen->m_BlockLocate.m_MoveVector ); } }
static void drawMovingBlock( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition, bool aErase ) { BASE_SCREEN* screen = aPanel->GetScreen(); // do not show local module rastnest in block move, it is not usable. DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)aPanel->GetDisplayOptions(); bool showRats = displ_opts->m_Show_Module_Ratsnest; displ_opts->m_Show_Module_Ratsnest = false; if( aErase ) { if( screen->m_BlockLocate.GetMoveVector().x || screen->m_BlockLocate.GetMoveVector().y ) { screen->m_BlockLocate.Draw( aPanel, aDC, screen->m_BlockLocate.GetMoveVector(), GR_XOR, BLOCK_OUTLINE_COLOR ); if( blockDrawItems ) drawPickedItems( aPanel, aDC, screen->m_BlockLocate.GetMoveVector() ); } } if( screen->m_BlockLocate.GetState() != STATE_BLOCK_STOP ) { screen->m_BlockLocate.SetMoveVector( aPanel->GetParent()->GetCrossHairPosition() - screen->m_BlockLocate.GetLastCursorPosition() ); } if( screen->m_BlockLocate.GetMoveVector().x || screen->m_BlockLocate.GetMoveVector().y ) { screen->m_BlockLocate.Draw( aPanel, aDC, screen->m_BlockLocate.GetMoveVector(), GR_XOR, BLOCK_OUTLINE_COLOR ); if( blockDrawItems ) drawPickedItems( aPanel, aDC, screen->m_BlockLocate.GetMoveVector() ); } displ_opts->m_Show_Module_Ratsnest = showRats; }