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
f24075bb
Commit
f24075bb
authored
Jul 15, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed offset of dragged items when the moving tool is invoked by the hotkey (GAL).
parent
2c5b7945
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
edit_tool.cpp
pcbnew/tools/edit_tool.cpp
+7
-2
No files found.
pcbnew/tools/edit_tool.cpp
View file @
f24075bb
...
@@ -176,11 +176,16 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent )
...
@@ -176,11 +176,16 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent )
}
}
else
else
{
{
const
VECTOR2D
&
dragOrigin
=
getView
()
->
GetGAL
()
->
GetGridPoint
(
evt
->
DragOrigin
()
);
VECTOR2D
origin
;
if
(
evt
->
IsDrag
(
BUT_LEFT
)
)
origin
=
getView
()
->
GetGAL
()
->
GetGridPoint
(
evt
->
DragOrigin
()
);
else
origin
=
getViewControls
()
->
GetCursorPosition
();
// Update dragging offset (distance between cursor and the first dragged item)
// Update dragging offset (distance between cursor and the first dragged item)
m_offset
=
static_cast
<
BOARD_ITEM
*>
(
selection
.
items
.
GetPickedItem
(
0
)
)
->
GetPosition
()
-
m_offset
=
static_cast
<
BOARD_ITEM
*>
(
selection
.
items
.
GetPickedItem
(
0
)
)
->
GetPosition
()
-
wxPoint
(
dragOrigin
.
x
,
dragO
rigin
.
y
);
wxPoint
(
origin
.
x
,
o
rigin
.
y
);
}
}
m_dragging
=
true
;
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