Fill in missing zone properties.

Also fixes some bugs with hatch properties being available
on rule areas.
This commit is contained in:
Jeff Young
2024-02-04 23:01:31 +00:00
parent b08f1ee6bf
commit 77c19fa99a
6 changed files with 160 additions and 41 deletions
+19
View File
@@ -88,6 +88,10 @@ wxPGWindowList PG_UNIT_EDITOR::CreateControls( wxPropertyGrid* aPropGrid, wxPGPr
{
m_unitBinder->SetCoordType( prop->CoordType() );
}
else if( dynamic_cast<PGPROPERTY_AREA*>( aProperty) != nullptr )
{
m_unitBinder->SetDataType( EDA_DATA_TYPE::AREA );
}
else if( dynamic_cast<PGPROPERTY_ANGLE*>( aProperty ) != nullptr )
{
m_unitBinder->SetCoordType( ORIGIN_TRANSFORMS::NOT_A_COORD );
@@ -108,6 +112,10 @@ void PG_UNIT_EDITOR::UpdateControl( wxPGProperty* aProperty, wxWindow* aCtrl ) c
{
m_unitBinder->ChangeValue( var.GetLong() );
}
else if( var.GetType() == wxPG_VARIANT_TYPE_LONGLONG )
{
m_unitBinder->ChangeDoubleValue( var.GetLongLong().ToDouble() );
}
else if( var.GetType() == wxPG_VARIANT_TYPE_DOUBLE )
{
m_unitBinder->ChangeValue( var.GetDouble() );
@@ -186,6 +194,17 @@ bool PG_UNIT_EDITOR::GetValueFromControl( wxVariant& aVariant, wxPGProperty* aPr
}
}
}
else if( dynamic_cast<PGPROPERTY_AREA*>( aProperty ) != nullptr )
{
wxLongLongNative result = m_unitBinder->GetValue();
changed = ( aVariant.IsNull() || result != aVariant.GetLongLong() );
if( changed )
{
aVariant = result;
m_unitBinder->SetDoubleValue( result.ToDouble() );
}
}
else
{
long result = m_unitBinder->GetValue();