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
5e3ab406
Commit
5e3ab406
authored
Sep 09, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enabled snapping for the move tool.
parent
0dc587e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
move_tool.cpp
pcbnew/tools/move_tool.cpp
+3
-0
No files found.
pcbnew/tools/move_tool.cpp
View file @
5e3ab406
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#include <class_module.h>
#include <class_module.h>
#include <tool/tool_manager.h>
#include <tool/tool_manager.h>
#include <view/view_group.h>
#include <view/view_group.h>
#include <view/view_controls.h>
#include "selection_tool.h"
#include "selection_tool.h"
#include "move_tool.h"
#include "move_tool.h"
...
@@ -74,6 +75,7 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent )
...
@@ -74,6 +75,7 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent )
VIEW_GROUP
items
(
view
);
VIEW_GROUP
items
(
view
);
view
->
Add
(
&
items
);
view
->
Add
(
&
items
);
m_toolMgr
->
GetViewControls
()
->
SetSnapping
(
true
);
// Main loop: keep receiving events
// Main loop: keep receiving events
while
(
OPT_TOOL_EVENT
evt
=
Wait
()
)
while
(
OPT_TOOL_EVENT
evt
=
Wait
()
)
...
@@ -164,6 +166,7 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent )
...
@@ -164,6 +166,7 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent )
m_itemsState
.
clear
();
m_itemsState
.
clear
();
items
.
Clear
();
items
.
Clear
();
view
->
Remove
(
&
items
);
view
->
Remove
(
&
items
);
m_toolMgr
->
GetViewControls
()
->
SetSnapping
(
false
);
return
0
;
return
0
;
}
}
...
...
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