Minor fix in zones_by_polygon.cpp: When editing a non copper zone, some settings were not those of the edited zone.
trigo.h: Add a useful double NormalizeAngleDegrees( double Angle, double aMin, double aMax ).
This commit is contained in:
parent
e4d512a293
commit
e8df845b3f
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2013 KiCad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 2018 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -271,6 +271,17 @@ inline double NormalizeAngleRadiansPos( double Angle )
|
|||
return Angle;
|
||||
}
|
||||
|
||||
/// Normalize angle to be aMin < angle <= aMax
|
||||
/// angle is in degrees
|
||||
inline double NormalizeAngleDegrees( double Angle, double aMin, double aMax )
|
||||
{
|
||||
while( Angle < aMin )
|
||||
Angle += 360.0;
|
||||
while( Angle >= aMax )
|
||||
Angle -= 360.0;
|
||||
return Angle;
|
||||
}
|
||||
|
||||
/// Add two angles (keeping the result normalized). T2 is here
|
||||
// because most of the time it's an int (and templates don't promote in
|
||||
// that way)
|
||||
|
|
|
@ -894,13 +894,12 @@ void PCB_EDIT_FRAME::Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* aZone )
|
|||
else if( IsCopperLayer( aZone->GetLayer() ) )
|
||||
{
|
||||
// edit a zone on a copper layer
|
||||
|
||||
zoneInfo << *aZone;
|
||||
|
||||
edited = InvokeCopperZonesEditor( this, &zoneInfo );
|
||||
}
|
||||
else
|
||||
{
|
||||
zoneInfo << *aZone;
|
||||
edited = InvokeNonCopperZonesEditor( this, aZone, &zoneInfo );
|
||||
}
|
||||
|
||||
|
@ -989,6 +988,9 @@ void PCB_EDIT_FRAME::Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* aZone )
|
|||
GetBoard()->GetConnectivity()->RecalculateRatsnest();
|
||||
|
||||
s_PickedList.ClearItemsList(); // s_ItemsListPicker is no longer owner of picked items
|
||||
|
||||
if( !IsGalCanvasActive() )
|
||||
m_canvas->Refresh();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue