mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-02 00:26:45 +00:00
Account for origin transforms in WX_PT_ENTRY_DIALOG
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19673
This commit is contained in:
parent
7993daecf0
commit
6423571349
@ -57,6 +57,10 @@ WX_PT_ENTRY_DIALOG::WX_PT_ENTRY_DIALOG( EDA_DRAW_FRAME* aParent, const wxString&
|
||||
{
|
||||
m_labelX->SetLabel( aLabelX );
|
||||
m_labelY->SetLabel( aLabelY );
|
||||
|
||||
m_unit_binder_x.SetCoordType( ORIGIN_TRANSFORMS::ABS_X_COORD );
|
||||
m_unit_binder_y.SetCoordType( ORIGIN_TRANSFORMS::ABS_Y_COORD );
|
||||
|
||||
m_unit_binder_x.SetValue( aDefaultValue.x );
|
||||
m_unit_binder_y.SetValue( aDefaultValue.y );
|
||||
|
||||
|
@ -2442,7 +2442,7 @@ int PCB_POINT_EDITOR::movePoint( const TOOL_EVENT& aEvent )
|
||||
BOARD_COMMIT commit( editFrame );
|
||||
commit.Stage( m_editPoints->GetParent(), CHT_MODIFY );
|
||||
|
||||
VECTOR2I pt = editFrame->GetOriginTransforms().ToDisplayAbs( m_editedPoint->GetPosition() );
|
||||
VECTOR2I pt = m_editedPoint->GetPosition();
|
||||
wxString title;
|
||||
wxString msg;
|
||||
|
||||
@ -2461,8 +2461,7 @@ int PCB_POINT_EDITOR::movePoint( const TOOL_EVENT& aEvent )
|
||||
|
||||
if( dlg.ShowModal() == wxID_OK )
|
||||
{
|
||||
pt = editFrame->GetOriginTransforms().FromDisplayAbs( dlg.GetValue() );
|
||||
m_editedPoint->SetPosition( pt );
|
||||
m_editedPoint->SetPosition( dlg.GetValue() );
|
||||
updateItem( commit );
|
||||
commit.Push( msg );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user