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
69c73b0e
Commit
69c73b0e
authored
Jul 09, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated POINT_EDITOR to handle module edges.
parent
26323007
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
point_editor.cpp
pcbnew/tools/point_editor.cpp
+10
-2
No files found.
pcbnew/tools/point_editor.cpp
View file @
69c73b0e
...
...
@@ -36,7 +36,7 @@
#include "point_editor.h"
#include <wxPcbStruct.h>
#include <class_
drawsegment
.h>
#include <class_
edge_mod
.h>
#include <class_dimension.h>
#include <class_zone.h>
#include <class_board.h>
...
...
@@ -77,6 +77,7 @@ public:
switch
(
aItem
->
Type
()
)
{
case
PCB_LINE_T
:
case
PCB_MODULE_EDGE_T
:
{
const
DRAWSEGMENT
*
segment
=
static_cast
<
const
DRAWSEGMENT
*>
(
aItem
);
...
...
@@ -354,6 +355,7 @@ void POINT_EDITOR::updateItem() const
switch
(
item
->
Type
()
)
{
case
PCB_LINE_T
:
case
PCB_MODULE_EDGE_T
:
{
DRAWSEGMENT
*
segment
=
static_cast
<
DRAWSEGMENT
*>
(
item
);
switch
(
segment
->
GetShape
()
)
...
...
@@ -428,6 +430,10 @@ void POINT_EDITOR::updateItem() const
break
;
}
// Update relative coordinates for module edges
if
(
EDGE_MODULE
*
edge
=
dyn_cast
<
EDGE_MODULE
*>
(
item
)
)
edge
->
SetLocalCoord
();
break
;
}
...
...
@@ -521,6 +527,7 @@ void POINT_EDITOR::updatePoints() const
switch
(
item
->
Type
()
)
{
case
PCB_LINE_T
:
case
PCB_MODULE_EDGE_T
:
{
const
DRAWSEGMENT
*
segment
=
static_cast
<
const
DRAWSEGMENT
*>
(
item
);
{
...
...
@@ -610,6 +617,7 @@ EDIT_POINT POINT_EDITOR::get45DegConstrainer() const
switch
(
item
->
Type
()
)
{
case
PCB_LINE_T
:
case
PCB_MODULE_EDGE_T
:
{
const
DRAWSEGMENT
*
segment
=
static_cast
<
const
DRAWSEGMENT
*>
(
item
);
{
...
...
@@ -700,7 +708,7 @@ void POINT_EDITOR::breakOutline( const VECTOR2I& aBreakPoint )
outline
->
InsertCorner
(
nearestIdx
,
nearestPoint
.
x
,
nearestPoint
.
y
);
}
else
if
(
item
->
Type
()
==
PCB_LINE_T
)
else
if
(
item
->
Type
()
==
PCB_LINE_T
||
item
->
Type
()
==
PCB_MODULE_EDGE_T
)
{
getEditFrame
<
PCB_BASE_FRAME
>
()
->
OnModify
();
getEditFrame
<
PCB_BASE_FRAME
>
()
->
SaveCopyInUndoList
(
selection
.
items
,
UR_CHANGED
);
...
...
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