Legacy canvas: fix missing code to draw block outline.
Due to recent changes in legacy canvas code, when starting a block command, the block outline was not drawn in pcbnew and pl_editor during block definition. Fixes: lp:1803668 https://bugs.launchpad.net/kicad/+bug/1803668
This commit is contained in:
parent
940353afde
commit
f90ca7408d
|
@ -178,9 +178,16 @@ void DrawAndSizingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoin
|
||||||
BLOCK_SELECTOR* block = &aPanel->GetScreen()->m_BlockLocate;
|
BLOCK_SELECTOR* block = &aPanel->GetScreen()->m_BlockLocate;
|
||||||
|
|
||||||
block->SetMoveVector( wxPoint( 0, 0 ) );
|
block->SetMoveVector( wxPoint( 0, 0 ) );
|
||||||
|
|
||||||
|
if( aErase && aDC ) // Erase current outline
|
||||||
|
block->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode, block->GetColor() );
|
||||||
|
|
||||||
block->SetLastCursorPosition( aPanel->GetParent()->GetCrossHairPosition() );
|
block->SetLastCursorPosition( aPanel->GetParent()->GetCrossHairPosition() );
|
||||||
block->SetEnd( aPanel->GetParent()->GetCrossHairPosition() );
|
block->SetEnd( aPanel->GetParent()->GetCrossHairPosition() );
|
||||||
|
|
||||||
|
if( aDC ) // Draw new outline
|
||||||
|
block->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode, block->GetColor() );
|
||||||
|
|
||||||
if( block->GetState() == STATE_BLOCK_INIT )
|
if( block->GetState() == STATE_BLOCK_INIT )
|
||||||
{
|
{
|
||||||
if( block->GetWidth() || block->GetHeight() )
|
if( block->GetWidth() || block->GetHeight() )
|
||||||
|
|
Loading…
Reference in New Issue