Remove properties flag from via placer so single-click mode works.

Fixes: lp:1796769
* https://bugs.launchpad.net/kicad/+bug/1796769
This commit is contained in:
Jeff Young 2018-10-09 23:18:15 +01:00
parent abdb91203f
commit e79e2f0175
3 changed files with 12 additions and 6 deletions

View File

@ -1739,7 +1739,7 @@ int DRAWING_TOOL::DrawVia( const TOOL_EVENT& aEvent )
frame()->SetToolID( ID_PCB_DRAW_VIA_BUTT, wxCURSOR_PENCIL, _( "Add vias" ) );
doInteractiveItemPlacement( &placer, _( "Place via" ),
IPO_REPEAT | IPO_SINGLE_CLICK | IPO_ROTATE | IPO_FLIP | IPO_PROPERTIES );
IPO_REPEAT | IPO_SINGLE_CLICK | IPO_ROTATE | IPO_FLIP );
frame()->SetToolID( ID_NO_TOOL_SELECTED, wxCURSOR_DEFAULT, wxEmptyString );

View File

@ -115,7 +115,7 @@ int MODULE_EDITOR_TOOLS::PlacePad( const TOOL_EVENT& aEvent )
assert( board()->m_Modules );
doInteractiveItemPlacement( &placer, _( "Place pad" ), IPO_REPEAT | IPO_SINGLE_CLICK | IPO_ROTATE | IPO_FLIP | IPO_PROPERTIES );
doInteractiveItemPlacement( &placer, _( "Place pad" ), IPO_REPEAT | IPO_SINGLE_CLICK | IPO_ROTATE | IPO_FLIP );
frame()->SetNoToolSelected();

View File

@ -66,9 +66,12 @@ void PCB_TOOL::doInteractiveItemPlacement( INTERACTIVE_PLACER_BASE* aPlacer,
VECTOR2I cursorPos = controls()->GetCursorPosition();
newItem = aPlacer->CreateItem();
newItem->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) );
preview.Add( newItem.get() );
if( newItem )
{
newItem->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) );
preview.Add( newItem.get() );
}
}
// Main loop: keep receiving events
@ -155,9 +158,12 @@ void PCB_TOOL::doInteractiveItemPlacement( INTERACTIVE_PLACER_BASE* aPlacer,
VECTOR2I pos = controls()->GetCursorPosition();
newItem = aPlacer->CreateItem();
newItem->SetPosition( wxPoint( pos.x, pos.y ) );
preview.Add( newItem.get() );
if( newItem )
{
newItem->SetPosition( wxPoint( pos.x, pos.y ) );
preview.Add( newItem.get() );
}
}
}
}