2017-02-23 06:23:17 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
2023-01-28 10:40:28 +00:00
|
|
|
* Copyright (C) 2017-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
2017-02-23 06:23:17 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
2019-05-12 11:49:58 +00:00
|
|
|
#include "pcb_tool_base.h"
|
2017-02-23 06:23:17 +00:00
|
|
|
|
|
|
|
#include <tool/tool_manager.h>
|
|
|
|
#include <board_commit.h>
|
2020-11-12 20:19:22 +00:00
|
|
|
#include <footprint.h>
|
2017-10-30 19:17:23 +00:00
|
|
|
#include <pcb_draw_panel_gal.h>
|
2021-08-29 23:33:08 +00:00
|
|
|
#include <pgm_base.h>
|
|
|
|
#include <settings/settings_manager.h>
|
2020-01-13 01:44:19 +00:00
|
|
|
#include <pcbnew_settings.h>
|
2021-08-29 23:33:08 +00:00
|
|
|
#include <footprint_editor_settings.h>
|
2021-09-06 13:35:36 +00:00
|
|
|
#include <tools/pcb_grid_helper.h>
|
|
|
|
#include <tools/pcb_selection_tool.h>
|
|
|
|
#include <tools/pcb_actions.h>
|
|
|
|
#include <tools/tool_event_utils.h>
|
2022-11-14 23:39:08 +00:00
|
|
|
#include <tools/zone_filler_tool.h>
|
|
|
|
|
2017-02-23 06:23:17 +00:00
|
|
|
|
2022-09-14 17:31:56 +00:00
|
|
|
void PCB_TOOL_BASE::doInteractiveItemPlacement( const TOOL_EVENT& aTool,
|
2019-07-15 12:15:58 +00:00
|
|
|
INTERACTIVE_PLACER_BASE* aPlacer,
|
2019-06-05 19:15:57 +00:00
|
|
|
const wxString& aCommitMessage, int aOptions )
|
2017-02-23 06:23:17 +00:00
|
|
|
{
|
|
|
|
using namespace std::placeholders;
|
|
|
|
std::unique_ptr<BOARD_ITEM> newItem;
|
|
|
|
|
2019-07-15 12:15:58 +00:00
|
|
|
frame()->PushTool( aTool );
|
2017-02-23 06:23:17 +00:00
|
|
|
|
2017-04-22 15:46:31 +00:00
|
|
|
BOARD_COMMIT commit( frame() );
|
2017-02-23 06:23:17 +00:00
|
|
|
|
2023-06-26 22:16:51 +00:00
|
|
|
GetManager()->RunAction( PCB_ACTIONS::selectionClear );
|
2017-02-23 06:23:17 +00:00
|
|
|
|
2021-09-13 12:23:10 +00:00
|
|
|
Activate();
|
|
|
|
// Must be done after Activate() so that it gets set into the correct context
|
2017-04-22 15:46:31 +00:00
|
|
|
controls()->ShowCursor( true );
|
2022-04-10 22:14:30 +00:00
|
|
|
controls()->ForceCursorPosition( false );
|
2021-09-13 12:23:10 +00:00
|
|
|
// do not capture or auto-pan until we start placing an item
|
2017-02-23 06:23:17 +00:00
|
|
|
|
2021-09-06 13:35:36 +00:00
|
|
|
PCB_GRID_HELPER grid( m_toolMgr, frame()->GetMagneticItemsSettings() );
|
|
|
|
|
2017-02-23 06:23:17 +00:00
|
|
|
// Add a VIEW_GROUP that serves as a preview for the new item
|
2020-12-16 13:31:32 +00:00
|
|
|
PCB_SELECTION preview;
|
2017-04-22 15:46:31 +00:00
|
|
|
view()->Add( &preview );
|
|
|
|
|
|
|
|
aPlacer->m_board = board();
|
|
|
|
aPlacer->m_frame = frame();
|
2018-05-07 20:49:36 +00:00
|
|
|
aPlacer->m_modifiers = 0;
|
2017-04-22 15:46:31 +00:00
|
|
|
|
2020-11-07 17:50:22 +00:00
|
|
|
auto makeNewItem =
|
|
|
|
[&]( VECTOR2I aPosition )
|
|
|
|
{
|
|
|
|
if( frame()->GetModel() )
|
|
|
|
newItem = aPlacer->CreateItem();
|
2017-04-22 15:46:31 +00:00
|
|
|
|
2020-11-07 17:50:22 +00:00
|
|
|
if( newItem )
|
|
|
|
{
|
2022-08-30 14:13:51 +00:00
|
|
|
newItem->SetPosition( aPosition );
|
2020-11-07 17:50:22 +00:00
|
|
|
preview.Add( newItem.get() );
|
2019-07-01 21:01:33 +00:00
|
|
|
|
2020-11-13 12:21:02 +00:00
|
|
|
if( newItem->Type() == PCB_FOOTPRINT_T )
|
2020-11-07 17:50:22 +00:00
|
|
|
{
|
2023-06-24 18:54:50 +00:00
|
|
|
FOOTPRINT* fp = static_cast<FOOTPRINT*>( newItem.get() );
|
2019-07-01 21:01:33 +00:00
|
|
|
|
2020-11-07 17:50:22 +00:00
|
|
|
// footprints have more drawable parts
|
2020-11-13 12:21:02 +00:00
|
|
|
fp->RunOnChildren( std::bind( &KIGFX::VIEW_GROUP::Add, &preview, _1 ) );
|
2020-11-07 17:50:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
2019-07-01 21:01:33 +00:00
|
|
|
|
|
|
|
if( aOptions & IPO_SINGLE_CLICK )
|
|
|
|
makeNewItem( controls()->GetCursorPosition() );
|
2017-02-23 06:23:17 +00:00
|
|
|
|
2020-10-11 03:45:21 +00:00
|
|
|
auto setCursor =
|
|
|
|
[&]()
|
2020-10-08 02:47:01 +00:00
|
|
|
{
|
|
|
|
if( !newItem )
|
|
|
|
frame()->GetCanvas()->SetCurrentCursor( KICURSOR::PENCIL );
|
|
|
|
else
|
2020-10-11 03:45:21 +00:00
|
|
|
frame()->GetCanvas()->SetCurrentCursor( KICURSOR::PLACE );
|
2020-10-08 02:47:01 +00:00
|
|
|
};
|
|
|
|
|
2020-10-08 00:50:28 +00:00
|
|
|
// Set initial cursor
|
2020-10-08 02:47:01 +00:00
|
|
|
setCursor();
|
2020-10-08 00:50:28 +00:00
|
|
|
|
2017-02-23 06:23:17 +00:00
|
|
|
// Main loop: keep receiving events
|
2019-06-17 13:43:22 +00:00
|
|
|
while( TOOL_EVENT* evt = Wait() )
|
2017-02-23 06:23:17 +00:00
|
|
|
{
|
2020-10-08 02:47:01 +00:00
|
|
|
setCursor();
|
2020-04-01 17:24:58 +00:00
|
|
|
|
2021-09-06 13:35:36 +00:00
|
|
|
grid.SetSnap( false ); // Interactive placement tools need to set their own item snaps
|
|
|
|
grid.SetUseGrid( getView()->GetGAL()->GetGridSnapping() && !evt->DisableGridSnapping() );
|
|
|
|
VECTOR2I cursorPos = grid.BestSnapAnchor( controls()->GetMousePosition(), nullptr );
|
|
|
|
|
2018-05-07 20:49:36 +00:00
|
|
|
aPlacer->m_modifiers = evt->Modifier();
|
2017-02-23 06:23:17 +00:00
|
|
|
|
2020-11-07 17:50:22 +00:00
|
|
|
auto cleanup =
|
|
|
|
[&] ()
|
|
|
|
{
|
|
|
|
newItem = nullptr;
|
|
|
|
preview.Clear();
|
|
|
|
view()->Update( &preview );
|
|
|
|
controls()->SetAutoPan( false );
|
|
|
|
controls()->CaptureCursor( false );
|
|
|
|
controls()->ShowCursor( true );
|
2022-04-10 22:14:30 +00:00
|
|
|
controls()->ForceCursorPosition( false );
|
2020-11-07 17:50:22 +00:00
|
|
|
};
|
2019-07-01 21:01:33 +00:00
|
|
|
|
|
|
|
if( evt->IsCancelInteractive() )
|
|
|
|
{
|
|
|
|
if( aOptions & IPO_SINGLE_CLICK )
|
2017-02-23 06:23:17 +00:00
|
|
|
{
|
2019-07-01 21:01:33 +00:00
|
|
|
cleanup();
|
2019-07-15 12:15:58 +00:00
|
|
|
frame()->PopTool( aTool );
|
2019-07-01 21:01:33 +00:00
|
|
|
break;
|
2017-02-23 06:23:17 +00:00
|
|
|
}
|
2019-07-01 21:01:33 +00:00
|
|
|
else if( newItem )
|
2021-05-21 13:53:32 +00:00
|
|
|
{
|
2019-07-01 21:01:33 +00:00
|
|
|
cleanup();
|
2021-05-21 13:53:32 +00:00
|
|
|
}
|
2019-07-01 21:01:33 +00:00
|
|
|
else
|
2017-02-23 06:23:17 +00:00
|
|
|
{
|
2019-07-15 12:15:58 +00:00
|
|
|
frame()->PopTool( aTool );
|
2017-02-23 06:23:17 +00:00
|
|
|
break;
|
|
|
|
}
|
2019-07-01 21:01:33 +00:00
|
|
|
}
|
|
|
|
else if( evt->IsActivate() )
|
|
|
|
{
|
|
|
|
if( newItem )
|
|
|
|
cleanup();
|
2017-02-23 06:23:17 +00:00
|
|
|
|
2019-07-01 21:01:33 +00:00
|
|
|
if( evt->IsPointEditor() )
|
|
|
|
{
|
|
|
|
// don't exit (the point editor runs in the background)
|
|
|
|
}
|
|
|
|
else if( evt->IsMoveTool() )
|
|
|
|
{
|
|
|
|
// leave ourselves on the stack so we come back after the move
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2019-07-15 12:15:58 +00:00
|
|
|
frame()->PopTool( aTool );
|
2017-02-23 06:23:17 +00:00
|
|
|
break;
|
2019-07-01 21:01:33 +00:00
|
|
|
}
|
2017-02-23 06:23:17 +00:00
|
|
|
}
|
2020-12-14 22:03:17 +00:00
|
|
|
else if( evt->IsClick( BUT_LEFT ) || evt->IsDblClick( BUT_LEFT ) )
|
2017-02-23 06:23:17 +00:00
|
|
|
{
|
|
|
|
if( !newItem )
|
|
|
|
{
|
|
|
|
// create the item if possible
|
2019-07-01 21:01:33 +00:00
|
|
|
makeNewItem( cursorPos );
|
2017-02-23 06:23:17 +00:00
|
|
|
|
|
|
|
// no item created, so wait for another click
|
|
|
|
if( !newItem )
|
|
|
|
continue;
|
|
|
|
|
2017-04-22 15:46:31 +00:00
|
|
|
controls()->CaptureCursor( true );
|
|
|
|
controls()->SetAutoPan( true );
|
2017-02-23 06:23:17 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-11-30 12:18:24 +00:00
|
|
|
BOARD_ITEM* newBoardItem = newItem.release();
|
|
|
|
EDA_ITEM_FLAGS oldFlags = newBoardItem->GetFlags();
|
2017-02-23 06:23:17 +00:00
|
|
|
|
2022-11-30 12:18:24 +00:00
|
|
|
newBoardItem->ClearFlags();
|
|
|
|
|
|
|
|
if( !aPlacer->PlaceItem( newBoardItem, commit ) )
|
2019-01-23 15:18:44 +00:00
|
|
|
{
|
2022-11-30 12:18:24 +00:00
|
|
|
newBoardItem->SetFlags( oldFlags );
|
2023-02-11 13:40:20 +00:00
|
|
|
newItem.reset( newBoardItem );
|
2019-01-23 15:18:44 +00:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2019-07-01 21:01:33 +00:00
|
|
|
preview.Clear();
|
2017-02-23 06:23:17 +00:00
|
|
|
commit.Push( aCommitMessage );
|
|
|
|
|
2017-04-22 15:46:31 +00:00
|
|
|
controls()->CaptureCursor( false );
|
|
|
|
controls()->SetAutoPan( false );
|
|
|
|
controls()->ShowCursor( true );
|
2017-06-23 11:56:28 +00:00
|
|
|
|
|
|
|
if( !( aOptions & IPO_REPEAT ) )
|
2017-04-22 15:46:31 +00:00
|
|
|
break;
|
|
|
|
|
2019-07-01 21:01:33 +00:00
|
|
|
if( aOptions & IPO_SINGLE_CLICK )
|
|
|
|
makeNewItem( controls()->GetCursorPosition() );
|
2020-10-08 02:47:01 +00:00
|
|
|
|
|
|
|
setCursor();
|
2017-02-23 06:23:17 +00:00
|
|
|
}
|
|
|
|
}
|
2018-08-01 16:58:27 +00:00
|
|
|
else if( evt->IsClick( BUT_RIGHT ) )
|
|
|
|
{
|
2019-05-19 21:04:04 +00:00
|
|
|
m_menu.ShowContextMenu( selection() );
|
2018-08-01 16:58:27 +00:00
|
|
|
}
|
2020-08-31 22:32:11 +00:00
|
|
|
else if( evt->IsAction( &PCB_ACTIONS::trackViaSizeChanged ) )
|
|
|
|
{
|
2023-06-26 22:16:51 +00:00
|
|
|
m_toolMgr->PostAction( ACTIONS::refreshPreview );
|
2020-08-31 22:32:11 +00:00
|
|
|
}
|
2017-02-23 06:23:17 +00:00
|
|
|
else if( newItem && evt->Category() == TC_COMMAND )
|
|
|
|
{
|
|
|
|
/*
|
2019-10-17 18:44:49 +00:00
|
|
|
* Handle any events that can affect the item as we move it around
|
2017-02-23 06:23:17 +00:00
|
|
|
*/
|
2017-04-22 15:46:31 +00:00
|
|
|
if( TOOL_EVT_UTILS::IsRotateToolEvt( *evt ) && ( aOptions & IPO_ROTATE ) )
|
2017-02-23 06:23:17 +00:00
|
|
|
{
|
2022-01-13 20:04:14 +00:00
|
|
|
EDA_ANGLE rotationAngle = TOOL_EVT_UTILS::GetEventRotationAngle( *frame(), *evt );
|
|
|
|
newItem->Rotate( newItem->GetPosition(), rotationAngle );
|
2017-04-22 15:46:31 +00:00
|
|
|
view()->Update( &preview );
|
2017-02-23 06:23:17 +00:00
|
|
|
}
|
2017-04-22 15:46:31 +00:00
|
|
|
else if( evt->IsAction( &PCB_ACTIONS::flip ) && ( aOptions & IPO_FLIP ) )
|
2017-02-23 06:23:17 +00:00
|
|
|
{
|
2022-07-24 15:49:46 +00:00
|
|
|
newItem->Flip( newItem->GetPosition(), frame()->GetPcbNewSettings()->m_FlipLeftRight );
|
2017-04-22 15:46:31 +00:00
|
|
|
view()->Update( &preview );
|
2017-02-23 06:23:17 +00:00
|
|
|
}
|
2021-01-15 00:50:52 +00:00
|
|
|
else if( evt->IsAction( &PCB_ACTIONS::properties ) )
|
|
|
|
{
|
|
|
|
frame()->OnEditItemRequest( newItem.get() );
|
|
|
|
|
|
|
|
// Notify other tools of the changes
|
|
|
|
m_toolMgr->ProcessEvent( EVENTS::SelectedItemsModified );
|
|
|
|
}
|
2019-10-17 18:44:49 +00:00
|
|
|
else if( evt->IsAction( &ACTIONS::refreshPreview ) )
|
|
|
|
{
|
|
|
|
preview.Clear();
|
2022-11-30 12:18:24 +00:00
|
|
|
newItem.reset();
|
2019-10-17 18:44:49 +00:00
|
|
|
|
2022-08-30 14:13:51 +00:00
|
|
|
makeNewItem( cursorPos );
|
2020-08-31 22:32:11 +00:00
|
|
|
aPlacer->SnapItem( newItem.get() );
|
2019-10-17 18:44:49 +00:00
|
|
|
view()->Update( &preview );
|
|
|
|
}
|
2020-12-06 13:31:08 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
evt->SetPassEvent();
|
|
|
|
}
|
2017-02-23 06:23:17 +00:00
|
|
|
}
|
|
|
|
else if( newItem && evt->IsMotion() )
|
|
|
|
{
|
|
|
|
// track the cursor
|
2022-08-30 14:13:51 +00:00
|
|
|
newItem->SetPosition( cursorPos );
|
2018-04-08 16:47:39 +00:00
|
|
|
aPlacer->SnapItem( newItem.get() );
|
2017-02-23 06:23:17 +00:00
|
|
|
|
|
|
|
// Show a preview of the item
|
2017-04-22 15:46:31 +00:00
|
|
|
view()->Update( &preview );
|
2017-02-23 06:23:17 +00:00
|
|
|
}
|
2019-07-26 18:16:44 +00:00
|
|
|
else
|
2020-11-07 17:50:22 +00:00
|
|
|
{
|
2019-07-26 18:16:44 +00:00
|
|
|
evt->SetPassEvent();
|
2020-11-07 17:50:22 +00:00
|
|
|
}
|
2017-02-23 06:23:17 +00:00
|
|
|
}
|
|
|
|
|
2017-04-22 15:46:31 +00:00
|
|
|
view()->Remove( &preview );
|
2020-11-19 20:08:58 +00:00
|
|
|
frame()->GetCanvas()->SetCurrentCursor( KICURSOR::ARROW );
|
2021-05-21 13:53:32 +00:00
|
|
|
controls()->SetAutoPan( false );
|
|
|
|
controls()->CaptureCursor( false );
|
2022-04-10 22:14:30 +00:00
|
|
|
controls()->ForceCursorPosition( false );
|
2017-02-23 06:23:17 +00:00
|
|
|
}
|
2017-10-30 19:17:23 +00:00
|
|
|
|
2019-06-05 19:15:57 +00:00
|
|
|
|
2019-05-12 11:49:58 +00:00
|
|
|
bool PCB_TOOL_BASE::Init()
|
2018-08-01 16:58:27 +00:00
|
|
|
{
|
|
|
|
// A basic context manu. Many (but not all) tools will choose to override this.
|
2020-11-07 17:50:22 +00:00
|
|
|
CONDITIONAL_MENU& ctxMenu = m_menu.GetMenu();
|
2018-08-01 16:58:27 +00:00
|
|
|
|
|
|
|
// cancel current tool goes in main context menu at the top if present
|
|
|
|
ctxMenu.AddItem( ACTIONS::cancelInteractive, SELECTION_CONDITIONS::ShowAlways, 1 );
|
2019-06-15 16:40:14 +00:00
|
|
|
ctxMenu.AddSeparator( 1 );
|
2018-08-01 16:58:27 +00:00
|
|
|
|
|
|
|
// Finally, add the standard zoom/grid items
|
2019-06-11 14:38:21 +00:00
|
|
|
getEditFrame<PCB_BASE_FRAME>()->AddStandardSubMenus( m_menu );
|
2018-08-01 16:58:27 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-05-12 11:49:58 +00:00
|
|
|
void PCB_TOOL_BASE::Reset( RESET_REASON aReason )
|
2017-10-31 11:01:59 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-06-05 19:15:57 +00:00
|
|
|
|
2019-05-12 11:49:58 +00:00
|
|
|
void PCB_TOOL_BASE::setTransitions()
|
2017-10-31 11:01:59 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-06-05 19:15:57 +00:00
|
|
|
|
2021-12-26 00:36:12 +00:00
|
|
|
PCBNEW_SETTINGS::DISPLAY_OPTIONS& PCB_TOOL_BASE::displayOptions() const
|
2017-10-30 19:17:23 +00:00
|
|
|
{
|
2021-12-26 00:36:12 +00:00
|
|
|
return frame()->GetPcbNewSettings()->m_Display;
|
2017-10-30 19:17:23 +00:00
|
|
|
}
|
|
|
|
|
2019-05-12 11:49:58 +00:00
|
|
|
PCB_DRAW_PANEL_GAL* PCB_TOOL_BASE::canvas() const
|
2017-10-30 19:17:23 +00:00
|
|
|
{
|
2019-06-13 17:28:55 +00:00
|
|
|
return static_cast<PCB_DRAW_PANEL_GAL*>( frame()->GetCanvas() );
|
2017-10-30 19:17:23 +00:00
|
|
|
}
|
2017-11-30 16:21:28 +00:00
|
|
|
|
2019-06-05 19:15:57 +00:00
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
const PCB_SELECTION& PCB_TOOL_BASE::selection() const
|
2017-11-30 16:21:28 +00:00
|
|
|
{
|
2020-12-16 13:31:32 +00:00
|
|
|
PCB_SELECTION_TOOL* selTool = m_toolMgr->GetTool<PCB_SELECTION_TOOL>();
|
2020-11-07 17:50:22 +00:00
|
|
|
|
|
|
|
return selTool->GetSelection();
|
2017-11-30 16:21:28 +00:00
|
|
|
}
|
|
|
|
|
2019-06-05 19:15:57 +00:00
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
PCB_SELECTION& PCB_TOOL_BASE::selection()
|
2017-11-30 16:21:28 +00:00
|
|
|
{
|
2020-12-16 13:31:32 +00:00
|
|
|
PCB_SELECTION_TOOL* selTool = m_toolMgr->GetTool<PCB_SELECTION_TOOL>();
|
2020-11-07 17:50:22 +00:00
|
|
|
|
|
|
|
return selTool->GetSelection();
|
2017-11-30 16:21:28 +00:00
|
|
|
}
|
2018-04-08 16:47:39 +00:00
|
|
|
|
|
|
|
|
2021-09-02 22:32:15 +00:00
|
|
|
bool PCB_TOOL_BASE::Is45Limited() const
|
|
|
|
{
|
2021-08-29 23:33:08 +00:00
|
|
|
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
|
|
|
|
|
2021-10-01 11:11:03 +00:00
|
|
|
if( frame()->IsType( FRAME_PCB_EDITOR ) )
|
2021-08-29 23:33:08 +00:00
|
|
|
return mgr.GetAppSettings<PCBNEW_SETTINGS>()->m_Use45DegreeLimit;
|
2021-10-01 11:11:03 +00:00
|
|
|
else
|
2021-08-29 23:33:08 +00:00
|
|
|
return mgr.GetAppSettings<FOOTPRINT_EDITOR_SETTINGS>()->m_Use45Limit;
|
2021-09-02 22:32:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-04-08 16:47:39 +00:00
|
|
|
void INTERACTIVE_PLACER_BASE::SnapItem( BOARD_ITEM *aItem )
|
|
|
|
{
|
|
|
|
// Base implementation performs no snapping
|
|
|
|
}
|
|
|
|
|
2019-06-05 19:15:57 +00:00
|
|
|
|
2019-01-23 15:18:44 +00:00
|
|
|
bool INTERACTIVE_PLACER_BASE::PlaceItem( BOARD_ITEM *aItem, BOARD_COMMIT& aCommit )
|
2018-04-08 16:47:39 +00:00
|
|
|
{
|
|
|
|
aCommit.Add( aItem );
|
2019-01-23 15:18:44 +00:00
|
|
|
return true;
|
2018-04-08 16:47:39 +00:00
|
|
|
}
|
2021-09-02 22:32:15 +00:00
|
|
|
|