Minor fixes to zone drawing tool.
This commit is contained in:
parent
1ff99b47c8
commit
4d6f628a1f
|
@ -970,10 +970,15 @@ int DRAWING_TOOL::drawZone( bool aKeepout )
|
||||||
if( numPoints > 0 ) // cancel the current zone
|
if( numPoints > 0 ) // cancel the current zone
|
||||||
{
|
{
|
||||||
delete zone;
|
delete zone;
|
||||||
|
zone = NULL;
|
||||||
m_controls->SetAutoPan( false );
|
m_controls->SetAutoPan( false );
|
||||||
|
|
||||||
if( direction45 )
|
if( direction45 )
|
||||||
|
{
|
||||||
preview.Remove( &line45 );
|
preview.Remove( &line45 );
|
||||||
|
direction45 = false;
|
||||||
|
}
|
||||||
|
|
||||||
preview.FreeItems();
|
preview.FreeItems();
|
||||||
updatePreview = true;
|
updatePreview = true;
|
||||||
|
|
||||||
|
@ -1010,10 +1015,20 @@ int DRAWING_TOOL::drawZone( bool aKeepout )
|
||||||
zone = NULL;
|
zone = NULL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
delete zone;
|
delete zone;
|
||||||
|
zone = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
numPoints = 0;
|
numPoints = 0;
|
||||||
m_controls->SetAutoPan( false );
|
m_controls->SetAutoPan( false );
|
||||||
|
|
||||||
|
if( direction45 )
|
||||||
|
{
|
||||||
|
preview.Remove( &line45 );
|
||||||
|
direction45 = false;
|
||||||
|
}
|
||||||
|
|
||||||
preview.FreeItems();
|
preview.FreeItems();
|
||||||
updatePreview = true;
|
updatePreview = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue