Browse Source

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

Fixes: lp:1796769
* https://bugs.launchpad.net/kicad/+bug/1796769
pull/13/head
Jeff Young 7 years ago
parent
commit
e79e2f0175
  1. 2
      pcbnew/tools/drawing_tool.cpp
  2. 2
      pcbnew/tools/footprint_editor_tools.cpp
  3. 14
      pcbnew/tools/pcb_tool.cpp

2
pcbnew/tools/drawing_tool.cpp

@ -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 );

2
pcbnew/tools/footprint_editor_tools.cpp

@ -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();

14
pcbnew/tools/pcb_tool.cpp

@ -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() );
}
}
}
}

Loading…
Cancel
Save