From 36e59065ff85c6f670d0f73832690eb98c58c9dd Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 15 Jun 2017 13:13:06 +0200 Subject: [PATCH] Minor fix: replace assert by wxASSERT in dialog (better to keep trace of an assert inside a wx application) --- pcbnew/dialogs/dialog_position_relative.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pcbnew/dialogs/dialog_position_relative.cpp b/pcbnew/dialogs/dialog_position_relative.cpp index edd7691b85..e094a225b7 100644 --- a/pcbnew/dialogs/dialog_position_relative.cpp +++ b/pcbnew/dialogs/dialog_position_relative.cpp @@ -179,9 +179,9 @@ void DIALOG_POSITION_RELATIVE::OnSelectItemClick( wxCommandEvent& event ) { event.Skip(); - POSITION_RELATIVE_TOOL* posrelTool = m_toolMgr->GetTool(); - assert( posrelTool ); + wxASSERT( posrelTool ); + m_toolMgr->RunAction( PCB_ACTIONS::selectpositionRelativeItem, true ); } @@ -189,7 +189,6 @@ void DIALOG_POSITION_RELATIVE::OnSelectItemClick( wxCommandEvent& event ) void DIALOG_POSITION_RELATIVE::UpdateAnchor( BOARD_ITEM* aBoardItem ) { m_anchor_position = aBoardItem->GetPosition(); - PutValueInLocalUnits( *m_anchor_x, m_anchor_position.x ); PutValueInLocalUnits( *m_anchor_y, m_anchor_position.y ); } @@ -210,8 +209,7 @@ void DIALOG_POSITION_RELATIVE::OnOkClick( wxCommandEvent& event ) m_options.entry2 = DoubleValueFromString( UNSCALED_UNITS, m_yEntry->GetValue() ); m_options.entryRotation = DoubleValueFromString( UNSCALED_UNITS, m_rotEntry->GetValue() ); POSITION_RELATIVE_TOOL* posrelTool = m_toolMgr->GetTool(); - assert( posrelTool ); - + wxASSERT( posrelTool ); posrelTool->RelativeItemSelectionMove( m_anchor_position, m_translation, m_rotation );