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
67136d21
Commit
67136d21
authored
Jul 09, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MInor fixes.
parent
ad000aef
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
14 deletions
+15
-14
class_pad.cpp
pcbnew/class_pad.cpp
+1
-2
drawing_tool.cpp
pcbnew/tools/drawing_tool.cpp
+6
-6
drawing_tool.h
pcbnew/tools/drawing_tool.h
+8
-6
No files found.
pcbnew/class_pad.cpp
View file @
67136d21
...
...
@@ -255,8 +255,7 @@ void D_PAD::SetLocalCoord()
}
m_Pos0
=
m_Pos
-
module
->
GetPosition
();
double
angle
=
module
->
GetOrientation
();
RotatePoint
(
&
m_Pos0
.
x
,
&
m_Pos0
.
y
,
-
angle
);
RotatePoint
(
&
m_Pos0
.
x
,
&
m_Pos0
.
y
,
-
module
->
GetOrientation
()
);
}
...
...
pcbnew/tools/drawing_tool.cpp
View file @
67136d21
...
...
@@ -77,7 +77,7 @@ int DRAWING_TOOL::DrawLine( TOOL_EVENT& aEvent )
{
m_frame
->
SetToolID
(
ID_MODEDIT_LINE_TOOL
,
wxCURSOR_PENCIL
,
_
(
"Add graphic line"
)
);
MODULE
*
module
=
m_
frame
->
GetBoard
()
->
m_Modules
;
MODULE
*
module
=
m_
board
->
m_Modules
;
EDGE_MODULE
*
line
=
new
EDGE_MODULE
(
module
);
while
(
drawSegment
(
S_SEGMENT
,
line
)
)
...
...
@@ -120,7 +120,7 @@ int DRAWING_TOOL::DrawCircle( TOOL_EVENT& aEvent )
{
m_frame
->
SetToolID
(
ID_MODEDIT_CIRCLE_TOOL
,
wxCURSOR_PENCIL
,
_
(
"Add graphic circle"
)
);
MODULE
*
module
=
m_
frame
->
GetBoard
()
->
m_Modules
;
MODULE
*
module
=
m_
board
->
m_Modules
;
EDGE_MODULE
*
circle
=
new
EDGE_MODULE
(
module
);
while
(
drawSegment
(
S_CIRCLE
,
circle
)
)
...
...
@@ -163,7 +163,7 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent )
{
m_frame
->
SetToolID
(
ID_MODEDIT_ARC_TOOL
,
wxCURSOR_PENCIL
,
_
(
"Add graphic arc"
)
);
MODULE
*
module
=
m_
frame
->
GetBoard
()
->
m_Modules
;
MODULE
*
module
=
m_
board
->
m_Modules
;
EDGE_MODULE
*
arc
=
new
EDGE_MODULE
(
module
);
while
(
drawArc
(
arc
)
)
...
...
@@ -527,7 +527,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent )
{
if
(
evt
->
IsAction
(
&
COMMON_ACTIONS
::
rotate
)
)
{
module
->
Rotate
(
module
->
GetPosition
(),
/*m_frame->GetRotationAngle()*/
900.0
);
module
->
Rotate
(
module
->
GetPosition
(),
m_frame
->
GetRotationAngle
()
);
preview
.
ViewUpdate
(
KIGFX
::
VIEW_ITEM
::
GEOMETRY
);
}
else
if
(
evt
->
IsAction
(
&
COMMON_ACTIONS
::
flip
)
)
...
...
@@ -1123,7 +1123,7 @@ int DRAWING_TOOL::placeTextModule()
{
TEXTE_MODULE
*
text
=
new
TEXTE_MODULE
(
NULL
);
const
BOARD_DESIGN_SETTINGS
&
dsnSettings
=
m_frame
->
GetDesignSettings
();
MODULE
*
module
=
m_
frame
->
GetBoard
()
->
m_Modules
;
MODULE
*
module
=
m_
board
->
m_Modules
;
// Add a VIEW_GROUP that serves as a preview for the new item
KIGFX
::
VIEW_GROUP
preview
(
m_view
);
...
...
@@ -1202,7 +1202,7 @@ int DRAWING_TOOL::placeTextModule()
text
->
ClearFlags
();
// Module has to be saved before any modification is made
m_frame
->
SaveCopyInUndoList
(
m
_frame
->
GetBoard
()
->
m_Modules
,
UR_MODEDIT
);
m_frame
->
SaveCopyInUndoList
(
m
odule
,
UR_MODEDIT
);
module
->
GraphicalItems
().
PushFront
(
text
);
m_view
->
Add
(
text
);
...
...
pcbnew/tools/drawing_tool.h
View file @
67136d21
...
...
@@ -116,7 +116,7 @@ public:
/**
* Function PlaceModule()
* Displays a dialog to select
ed a module to be added and then allows
user to set its position.
* Displays a dialog to select
a module to be added and allows the
user to set its position.
*/
int
PlaceModule
(
TOOL_EVENT
&
aEvent
);
...
...
@@ -165,11 +165,13 @@ private:
*/
int
placeTextPcb
();
///> Forces a DRAWSEGMENT to be drawn at multiple of 45 degrees. The origin
///> stays the same, the end of the aSegment is modified according to the
///> current cursor position.
///> @param aSegment is the segment that is currently drawn.
///> @param aHelper is a helper line that shows the next possible segment.
/**
* Function make45DegLine()
* Forces a DRAWSEGMENT to be drawn at multiple of 45 degrees. The origin stays the same,
* the end of the aSegment is modified according to the current cursor position.
* @param aSegment is the segment that is currently drawn.
* @param aHelper is a helper line that shows the next possible segment.
*/
void
make45DegLine
(
DRAWSEGMENT
*
aSegment
,
DRAWSEGMENT
*
aHelper
)
const
;
///> Sets up handlers for various events.
...
...
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