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
3e9bb6b8
Commit
3e9bb6b8
authored
Feb 20, 2015
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SELECTION::GetCenter() returns VECTOR2I instead of wxPoint.
parent
c2bd2491
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
edit_tool.cpp
pcbnew/tools/edit_tool.cpp
+4
-2
selection_tool.cpp
pcbnew/tools/selection_tool.cpp
+2
-2
selection_tool.h
pcbnew/tools/selection_tool.h
+1
-1
No files found.
pcbnew/tools/edit_tool.cpp
View file @
3e9bb6b8
...
...
@@ -618,7 +618,8 @@ int EDIT_TOOL::MoveExact( const TOOL_EVENT& aEvent )
editFrame
->
SaveCopyInUndoList
(
selection
.
items
,
UR_CHANGED
);
}
wxPoint
rotPoint
=
selection
.
GetCenter
();
VECTOR2I
rp
=
selection
.
GetCenter
();
wxPoint
rotPoint
(
rp
.
x
,
rp
.
y
);
for
(
unsigned
int
i
=
0
;
i
<
selection
.
items
.
GetCount
();
++
i
)
{
...
...
@@ -769,7 +770,8 @@ int EDIT_TOOL::CreateArray( const TOOL_EVENT& aEvent )
DIALOG_CREATE_ARRAY
::
ARRAY_OPTIONS
*
array_opts
=
NULL
;
const
wxPoint
rotPoint
=
selection
.
GetCenter
();
VECTOR2I
rp
=
selection
.
GetCenter
();
const
wxPoint
rotPoint
(
rp
.
x
,
rp
.
y
);
DIALOG_CREATE_ARRAY
dialog
(
editFrame
,
rotPoint
,
&
array_opts
);
int
ret
=
dialog
.
ShowModal
();
...
...
pcbnew/tools/selection_tool.cpp
View file @
3e9bb6b8
...
...
@@ -931,9 +931,9 @@ void SELECTION::clear()
}
wxPoint
SELECTION
::
GetCenter
()
const
VECTOR2I
SELECTION
::
GetCenter
()
const
{
wxPoint
centre
;
VECTOR2I
centre
;
if
(
Size
()
==
1
)
{
...
...
pcbnew/tools/selection_tool.h
View file @
3e9bb6b8
...
...
@@ -70,7 +70,7 @@ struct SELECTION
return
static_cast
<
T
*>
(
items
.
GetPickedItem
(
aIndex
)
);
}
wxPoint
GetCenter
()
const
;
VECTOR2I
GetCenter
()
const
;
private
:
/// Clears both the VIEW_GROUP and set of selected items. Please note that it does not
...
...
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