Fix call to properties when editing newly placed dimension
The edit is intended to be on the newly placed dimension, but the actual properties tool doesn't take an item, so it was always looking up the item to edit using the current selection/cursor position. Make this more robust by just calling the edit properties directly on the item.
This commit is contained in:
parent
3c24ddd8cc
commit
0a3b6c2d23
|
@ -1285,11 +1285,9 @@ int DRAWING_TOOL::DrawDimension( const TOOL_EVENT& aEvent )
|
|||
commit.Add( dimension );
|
||||
commit.Push( _( "Draw a dimension" ) );
|
||||
|
||||
// Run the edit immediately to set the leader text
|
||||
if( t == PCB_DIM_LEADER_T )
|
||||
{
|
||||
// Run the edit immediately to set the leader text
|
||||
m_toolMgr->RunAction( PCB_ACTIONS::properties, true, dimension );
|
||||
}
|
||||
frame()->OnEditItemRequest( dimension );
|
||||
|
||||
m_toolMgr->RunAction<EDA_ITEM*>( PCB_ACTIONS::selectItem, true, dimension );
|
||||
|
||||
|
|
Loading…
Reference in New Issue