diff --git a/pcbnew/widgets/pcb_properties_panel.cpp b/pcbnew/widgets/pcb_properties_panel.cpp index c9c11a0630..dae038f77c 100644 --- a/pcbnew/widgets/pcb_properties_panel.cpp +++ b/pcbnew/widgets/pcb_properties_panel.cpp @@ -30,8 +30,11 @@ #include #include #include +#include #include +#include #include +#include #include #include @@ -189,6 +192,20 @@ void PCB_PROPERTIES_PANEL::valueChanging( wxPropertyGridEvent& aEvent ) } +void setLocalCoord( BOARD_ITEM* aItem ) +{ + // TODO: we really need to get rid of this local/draw coords stuff (and make FP_* items the + // same as PCB_* items), but for now, it is what it is. + + if( FP_SHAPE* shape = dynamic_cast( aItem ) ) + shape->SetLocalCoord(); + else if( FP_TEXT* text = dynamic_cast( aItem ) ) + text->SetLocalCoord(); + else if( PAD* pad = dynamic_cast( aItem ) ) + pad->SetLocalCoord(); +} + + void PCB_PROPERTIES_PANEL::valueChanged( wxPropertyGridEvent& aEvent ) { PCB_SELECTION_TOOL* selectionTool = m_frame->GetToolManager()->GetTool(); @@ -205,6 +222,7 @@ void PCB_PROPERTIES_PANEL::valueChanged( wxPropertyGridEvent& aEvent ) BOARD_ITEM* item = static_cast( edaItem ); changes.Modify( item ); item->Set( property, newValue ); + setLocalCoord( item ); } changes.Push( _( "Change property" ) );