From 3b25fdc212c113da8910e38830ef500213aac90d Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Thu, 1 Dec 2022 16:54:36 -0500 Subject: [PATCH] Properties: Fix zones stomping on position props for other items --- pcbnew/zone.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pcbnew/zone.cpp b/pcbnew/zone.cpp index 043d9c27bf..374c2d6f35 100644 --- a/pcbnew/zone.cpp +++ b/pcbnew/zone.cpp @@ -1371,14 +1371,17 @@ static struct ZONE_DESC propMgr.InheritsAfter( TYPE_HASH( ZONE ), TYPE_HASH( BOARD_CONNECTED_ITEM ) ); // Mask layer and position properties; they aren't useful in current form - auto posX = new PROPERTY( _HKI( "Position X" ), &ZONE::SetX, &ZONE::GetX, - PROPERTY_DISPLAY::PT_COORD, - ORIGIN_TRANSFORMS::ABS_X_COORD ); + auto posX = new PROPERTY( _HKI( "Position X" ), + NO_SETTER( ZONE, int ), + reinterpret_cast( &ZONE::GetX ), + PROPERTY_DISPLAY::PT_COORD, + ORIGIN_TRANSFORMS::ABS_X_COORD ); posX->SetIsInternal( true ); - auto posY = new PROPERTY( _HKI( "Position Y" ), &ZONE::SetY, - &ZONE::GetY, PROPERTY_DISPLAY::PT_COORD, - ORIGIN_TRANSFORMS::ABS_Y_COORD ); + auto posY = new PROPERTY( _HKI( "Position Y" ), NO_SETTER( ZONE, int ), + reinterpret_cast( &ZONE::GetY ), + PROPERTY_DISPLAY::PT_COORD, + ORIGIN_TRANSFORMS::ABS_Y_COORD ); posY->SetIsInternal( true ); propMgr.ReplaceProperty( TYPE_HASH( BOARD_ITEM ), _HKI( "Position X" ), posX );