pcbnew: start integrating P&S router
This commit is contained in:
parent
b73474bda6
commit
fa817b7475
|
@ -269,6 +269,10 @@ void TOOL_DISPATCHER::DispatchWxCommand( wxCommandEvent &aEvent )
|
|||
|
||||
switch( aEvent.GetId() )
|
||||
{
|
||||
case ID_PNS_ROUTER_TOOL:
|
||||
toolName = "pcbnew.InteractiveRouter";
|
||||
activateTool = true;
|
||||
break;
|
||||
case ID_SELECTION_TOOL:
|
||||
toolName = "pcbnew.InteractiveSelection";
|
||||
activateTool = true;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
add_definitions(-DPCBNEW)
|
||||
add_subdirectory(router)
|
||||
|
||||
if (KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES)
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/scripting)
|
||||
|
@ -117,6 +118,7 @@ set(PCBNEW_AUTOROUTER_SRCS
|
|||
autorouter/work.cpp
|
||||
)
|
||||
|
||||
|
||||
set(PCBNEW_CLASS_SRCS
|
||||
tool_modview.cpp
|
||||
modview.cpp
|
||||
|
@ -324,6 +326,7 @@ if (KICAD_SCRIPTING_MODULES)
|
|||
swig_link_libraries(pcbnew
|
||||
3d-viewer
|
||||
pcbcommon
|
||||
pnsrouter
|
||||
common
|
||||
pcad2kicadpcb
|
||||
polygon
|
||||
|
@ -420,6 +423,7 @@ endif(APPLE)
|
|||
target_link_libraries(pcbnew
|
||||
3d-viewer
|
||||
pcbcommon
|
||||
pnsrouter
|
||||
common
|
||||
pcad2kicadpcb
|
||||
polygon
|
||||
|
|
|
@ -815,7 +815,7 @@ void PCB_BASE_FRAME::LoadSettings()
|
|||
{
|
||||
// Copper layers are required for netname layers
|
||||
view->SetRequired( GetNetnameLayer( layer ), layer );
|
||||
view->SetLayerTarget( layer, KiGfx::TARGET_CACHED );
|
||||
view->SetLayerTarget( layer, KiGfx::TARGET_NONCACHED );
|
||||
}
|
||||
else if( IsNetnameLayer( layer ) )
|
||||
{
|
||||
|
|
|
@ -305,6 +305,11 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
|
|||
_( "Interactive selection and drag&drop tool." ),
|
||||
KiBitmap( tools_xpm ) );
|
||||
|
||||
AddMenuItem( editMenu, ID_PNS_ROUTER_TOOL,
|
||||
_( "Interactive router" ),
|
||||
_( "Interactive router drag&drop tool." ),
|
||||
KiBitmap( tools_xpm ) );
|
||||
|
||||
/** Create View menu **/
|
||||
wxMenu* viewMenu = new wxMenu;
|
||||
|
||||
|
|
|
@ -120,8 +120,10 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
|
|||
// menu Config
|
||||
|
||||
/* Tom's hacks start */
|
||||
EVT_MENU ( ID_SELECTION_TOOL, PCB_EDIT_FRAME::onGenericCommand )
|
||||
EVT_MENU ( ID_SELECTION_TOOL, PCB_EDIT_FRAME::onGenericCommand )
|
||||
EVT_TOOL ( ID_SELECTION_TOOL, PCB_EDIT_FRAME::onGenericCommand )
|
||||
EVT_MENU ( ID_PNS_ROUTER_TOOL, PCB_EDIT_FRAME::onGenericCommand )
|
||||
EVT_TOOL ( ID_PNS_ROUTER_TOOL, PCB_EDIT_FRAME::onGenericCommand )
|
||||
/* Tom's hacks end */
|
||||
|
||||
EVT_MENU( ID_PCB_DRAWINGS_WIDTHS_SETUP, PCB_EDIT_FRAME::OnConfigurePcbOptions )
|
||||
|
|
|
@ -366,7 +366,8 @@ enum pcbnew_ids
|
|||
ID_FOOTPRINT_WIZARD_SELECT_WIZARD,
|
||||
ID_FOOTPRINT_WIZARD_EXPORT_TO_BOARD,
|
||||
|
||||
ID_SELECTION_TOOL
|
||||
ID_SELECTION_TOOL,
|
||||
ID_PNS_ROUTER_TOOL
|
||||
};
|
||||
|
||||
#endif // PCBNEW_ID_H_
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include <pcbnew_id.h>
|
||||
|
||||
#include "selection_tool.h"
|
||||
#include <router/router_tool.h>
|
||||
|
||||
void PCB_EDIT_FRAME::setupTools()
|
||||
{
|
||||
|
@ -45,6 +46,7 @@ void PCB_EDIT_FRAME::setupTools()
|
|||
|
||||
// register our selection tool.
|
||||
m_toolManager->RegisterTool( new SELECTION_TOOL );
|
||||
m_toolManager->RegisterTool( new ROUTER_TOOL );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue