Fix issues in DXF import and GFX import dialog

Fixes: lp:1812840
https://bugs.launchpad.net/kicad/+bug/1812840
This commit is contained in:
jean-pierre charras 2019-01-22 18:00:52 +01:00
parent d93b694327
commit c56d6ad2dd
2 changed files with 7 additions and 4 deletions

View File

@ -476,8 +476,11 @@ bool InvokeDialogImportGfxModule( PCB_BASE_FRAME* aCaller, MODULE* aModule )
void DIALOG_IMPORT_GFX::originOptionOnUpdateUI( wxUpdateUIEvent& event )
{
m_rbInteractivePlacement->SetValue( m_placementInteractive );
m_rbAbsolutePlacement->SetValue( not m_placementInteractive );
if( m_rbInteractivePlacement->GetValue() != m_placementInteractive )
m_rbInteractivePlacement->SetValue( m_placementInteractive );
if( m_rbAbsolutePlacement->GetValue() == m_placementInteractive )
m_rbAbsolutePlacement->SetValue( not m_placementInteractive );
m_DxfPcbPositionUnits->Enable( not m_placementInteractive );
m_DxfPcbXCoord->Enable( not m_placementInteractive );

View File

@ -321,12 +321,12 @@ void DXF_IMPORT_PLUGIN::addArc( const DL_ArcData& aData )
double arcStarty = 0;
// aData.anglex is in degrees. Our internal units are 0.1 degree
// so convert DXF angles to our units
// so convert DXF angles (in degrees) to our units
#define DXF2ANGLEUI 10
double startangle = aData.angle1 * DXF2ANGLEUI;
double endangle = aData.angle2 * DXF2ANGLEUI;
RotatePoint( &arcStartx, &arcStarty, -RAD2DECIDEG( startangle ) );
RotatePoint( &arcStartx, &arcStarty, -startangle );
VECTOR2D arcStart( mapX( arcStartx + aData.cx ), mapY( arcStarty + aData.cy ) );
// calculate arc angle (arcs are CCW, and should be < 0 in Pcbnew)