GCC fixes

This commit is contained in:
Jon Evans 2022-12-02 22:38:15 -05:00
parent 3cf3d15590
commit 4134db3c47
4 changed files with 8 additions and 3 deletions

View File

@ -336,6 +336,7 @@ NUMERIC_EVALUATOR::Token NUMERIC_EVALUATOR::getToken()
case Unit::Mil: retval.value.dValue = 25.4 / 1000.0; break;
case Unit::MM: retval.value.dValue = 1.0; break;
case Unit::CM: retval.value.dValue = 10.0; break;
default:
case Unit::Invalid: break;
}
}
@ -347,6 +348,7 @@ NUMERIC_EVALUATOR::Token NUMERIC_EVALUATOR::getToken()
case Unit::Mil: retval.value.dValue = 1.0 / 1000.0; break;
case Unit::MM: retval.value.dValue = 1.0 / 25.4; break;
case Unit::CM: retval.value.dValue = 1.0 / 2.54; break;
default:
case Unit::Invalid: break;
}
}
@ -358,6 +360,7 @@ NUMERIC_EVALUATOR::Token NUMERIC_EVALUATOR::getToken()
case Unit::Mil: retval.value.dValue = 1.0; break;
case Unit::MM: retval.value.dValue = 1000.0 / 25.4; break;
case Unit::CM: retval.value.dValue = 1000.0 / 2.54; break;
default:
case Unit::Invalid: break;
}
}

View File

@ -70,7 +70,7 @@ wxPGWindowList PG_UNIT_EDITOR::CreateControls( wxPropertyGrid* aPropGrid, wxPGPr
if( PGPROPERTY_DISTANCE* prop = dynamic_cast<PGPROPERTY_DISTANCE*>( aProperty ) )
m_unitBinder->SetCoordType( prop->CoordType() );
else if( PGPROPERTY_ANGLE* prop = dynamic_cast<PGPROPERTY_ANGLE*>( aProperty ) )
else if( dynamic_cast<PGPROPERTY_ANGLE*>( aProperty ) )
m_unitBinder->SetUnits( EDA_UNITS::DEGREES );
return ret;

View File

@ -58,9 +58,9 @@ UNIT_BINDER::UNIT_BINDER( EDA_BASE_FRAME* aParent, const EDA_IU_SCALE& aIUScale,
m_dataType( EDA_DATA_TYPE::DISTANCE ),
m_precision( 0 ),
m_eval( aParent->GetUserUnits() ),
m_unitsInValue( false ),
m_originTransforms( aParent->GetOriginTransforms() ),
m_coordType( ORIGIN_TRANSFORMS::NOT_A_COORD ),
m_unitsInValue( false )
m_coordType( ORIGIN_TRANSFORMS::NOT_A_COORD )
{
init();
m_allowEval = allowEval && ( !m_valueCtrl || dynamic_cast<wxTextEntry*>( m_valueCtrl ) );

View File

@ -1392,6 +1392,8 @@ static struct ZONE_DESC
{
if( ZONE* zone = dynamic_cast<ZONE*>( aItem ) )
return !zone->GetIsRuleArea() && IsCopperLayer( zone->GetFirstLayer() );
return false;
};
auto layer = new PROPERTY_ENUM<ZONE, PCB_LAYER_ID>( _HKI( "Layer" ),