Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
9f0b0226
Commit
9f0b0226
authored
Feb 18, 2015
by
Tomasz Włostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools: moved tools registration outside pcbframe.cpp
parent
4da839f3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
17 deletions
+12
-17
CMakeLists.txt
pcbnew/CMakeLists.txt
+1
-0
pcbframe.cpp
pcbnew/pcbframe.cpp
+3
-17
common_actions.h
pcbnew/tools/common_actions.h
+8
-0
No files found.
pcbnew/CMakeLists.txt
View file @
9f0b0226
...
...
@@ -275,6 +275,7 @@ set( PCBNEW_CLASS_SRCS
tools/module_tools.cpp
tools/placement_tool.cpp
tools/common_actions.cpp
tools/tools_common.cpp
)
set
(
PCBNEW_SRCS
${
PCBNEW_AUTOROUTER_SRCS
}
${
PCBNEW_CLASS_SRCS
}
${
PCBNEW_DIALOGS
}
)
...
...
pcbnew/pcbframe.cpp
View file @
9f0b0226
...
...
@@ -68,17 +68,9 @@
#include <tool/tool_manager.h>
#include <tool/tool_dispatcher.h>
#include <tools/selection_tool.h>
#include <router/router_tool.h>
#include <tools/edit_tool.h>
#include <tools/drawing_tool.h>
#include <tools/point_editor.h>
#include <tools/pcbnew_control.h>
#include <tools/pcb_editor_control.h>
#include <tools/placement_tool.h>
#include <tools/common_actions.h>
#include <scripting/python_console_frame.h>
#if defined(KICAD_SCRIPTING) || defined(KICAD_SCRIPTING_WXPYTHON)
...
...
@@ -545,14 +537,8 @@ void PCB_EDIT_FRAME::setupTools()
m_toolDispatcher
=
new
TOOL_DISPATCHER
(
m_toolManager
);
// Register tools
m_toolManager
->
RegisterTool
(
new
SELECTION_TOOL
);
m_toolManager
->
RegisterTool
(
new
ROUTER_TOOL
);
m_toolManager
->
RegisterTool
(
new
EDIT_TOOL
);
m_toolManager
->
RegisterTool
(
new
DRAWING_TOOL
);
m_toolManager
->
RegisterTool
(
new
POINT_EDITOR
);
m_toolManager
->
RegisterTool
(
new
PCBNEW_CONTROL
);
m_toolManager
->
RegisterTool
(
new
PCB_EDITOR_CONTROL
);
m_toolManager
->
RegisterTool
(
new
PLACEMENT_TOOL
);
registerAllTools
(
m_toolManager
);
m_toolManager
->
ResetTools
(
TOOL_BASE
::
RUN
);
// Run the selection tool, it is supposed to be always active
...
...
pcbnew/tools/common_actions.h
View file @
9f0b0226
...
...
@@ -22,10 +22,14 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __COMMON_ACTIONS_H
#define __COMMON_ACTIONS_H
#include <tool/tool_action.h>
#include <boost/optional.hpp>
class
TOOL_EVENT
;
class
TOOL_MANAGER
;
/**
* Class COMMON_ACTIONS
...
...
@@ -241,3 +245,7 @@ public:
*/
static
boost
::
optional
<
TOOL_EVENT
>
TranslateLegacyId
(
int
aId
);
};
void
registerAllTools
(
TOOL_MANAGER
*
aToolManager
);
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment