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
4068d6c8
Commit
4068d6c8
authored
Jul 09, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Selection tool uses the real drag origin to compute offset when dragging items.
parent
b8fd1de7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
edit_tool.cpp
pcbnew/tools/edit_tool.cpp
+4
-1
No files found.
pcbnew/tools/edit_tool.cpp
View file @
4068d6c8
...
...
@@ -30,6 +30,7 @@
#include <tool/tool_manager.h>
#include <view/view_controls.h>
#include <gal/graphics_abstraction_layer.h>
#include <ratsnest_data.h>
#include <confirm.h>
...
...
@@ -175,9 +176,11 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent )
}
else
{
const
VECTOR2D
&
dragOrigin
=
getView
()
->
GetGAL
()
->
GetGridPoint
(
evt
->
DragOrigin
()
);
// Update dragging offset (distance between cursor and the first dragged item)
m_offset
=
static_cast
<
BOARD_ITEM
*>
(
selection
.
items
.
GetPickedItem
(
0
)
)
->
GetPosition
()
-
wxPoint
(
m_cursor
.
x
,
m_cursor
.
y
);
wxPoint
(
dragOrigin
.
x
,
dragOrigin
.
y
);
}
m_dragging
=
true
;
...
...
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