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
Show 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()
...
@@ -255,8 +255,7 @@ void D_PAD::SetLocalCoord()
}
}
m_Pos0
=
m_Pos
-
module
->
GetPosition
();
m_Pos0
=
m_Pos
-
module
->
GetPosition
();
double
angle
=
module
->
GetOrientation
();
RotatePoint
(
&
m_Pos0
.
x
,
&
m_Pos0
.
y
,
-
module
->
GetOrientation
()
);
RotatePoint
(
&
m_Pos0
.
x
,
&
m_Pos0
.
y
,
-
angle
);
}
}
...
...
pcbnew/tools/drawing_tool.cpp
View file @
67136d21
...
@@ -77,7 +77,7 @@ int DRAWING_TOOL::DrawLine( TOOL_EVENT& aEvent )
...
@@ -77,7 +77,7 @@ int DRAWING_TOOL::DrawLine( TOOL_EVENT& aEvent )
{
{
m_frame
->
SetToolID
(
ID_MODEDIT_LINE_TOOL
,
wxCURSOR_PENCIL
,
_
(
"Add graphic line"
)
);
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
);
EDGE_MODULE
*
line
=
new
EDGE_MODULE
(
module
);
while
(
drawSegment
(
S_SEGMENT
,
line
)
)
while
(
drawSegment
(
S_SEGMENT
,
line
)
)
...
@@ -120,7 +120,7 @@ int DRAWING_TOOL::DrawCircle( TOOL_EVENT& aEvent )
...
@@ -120,7 +120,7 @@ int DRAWING_TOOL::DrawCircle( TOOL_EVENT& aEvent )
{
{
m_frame
->
SetToolID
(
ID_MODEDIT_CIRCLE_TOOL
,
wxCURSOR_PENCIL
,
_
(
"Add graphic circle"
)
);
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
);
EDGE_MODULE
*
circle
=
new
EDGE_MODULE
(
module
);
while
(
drawSegment
(
S_CIRCLE
,
circle
)
)
while
(
drawSegment
(
S_CIRCLE
,
circle
)
)
...
@@ -163,7 +163,7 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent )
...
@@ -163,7 +163,7 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent )
{
{
m_frame
->
SetToolID
(
ID_MODEDIT_ARC_TOOL
,
wxCURSOR_PENCIL
,
_
(
"Add graphic arc"
)
);
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
);
EDGE_MODULE
*
arc
=
new
EDGE_MODULE
(
module
);
while
(
drawArc
(
arc
)
)
while
(
drawArc
(
arc
)
)
...
@@ -527,7 +527,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent )
...
@@ -527,7 +527,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent )
{
{
if
(
evt
->
IsAction
(
&
COMMON_ACTIONS
::
rotate
)
)
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
);
preview
.
ViewUpdate
(
KIGFX
::
VIEW_ITEM
::
GEOMETRY
);
}
}
else
if
(
evt
->
IsAction
(
&
COMMON_ACTIONS
::
flip
)
)
else
if
(
evt
->
IsAction
(
&
COMMON_ACTIONS
::
flip
)
)
...
@@ -1123,7 +1123,7 @@ int DRAWING_TOOL::placeTextModule()
...
@@ -1123,7 +1123,7 @@ int DRAWING_TOOL::placeTextModule()
{
{
TEXTE_MODULE
*
text
=
new
TEXTE_MODULE
(
NULL
);
TEXTE_MODULE
*
text
=
new
TEXTE_MODULE
(
NULL
);
const
BOARD_DESIGN_SETTINGS
&
dsnSettings
=
m_frame
->
GetDesignSettings
();
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
// Add a VIEW_GROUP that serves as a preview for the new item
KIGFX
::
VIEW_GROUP
preview
(
m_view
);
KIGFX
::
VIEW_GROUP
preview
(
m_view
);
...
@@ -1202,7 +1202,7 @@ int DRAWING_TOOL::placeTextModule()
...
@@ -1202,7 +1202,7 @@ int DRAWING_TOOL::placeTextModule()
text
->
ClearFlags
();
text
->
ClearFlags
();
// Module has to be saved before any modification is made
// 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
);
module
->
GraphicalItems
().
PushFront
(
text
);
m_view
->
Add
(
text
);
m_view
->
Add
(
text
);
...
...
pcbnew/tools/drawing_tool.h
View file @
67136d21
...
@@ -116,7 +116,7 @@ public:
...
@@ -116,7 +116,7 @@ public:
/**
/**
* Function PlaceModule()
* 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
);
int
PlaceModule
(
TOOL_EVENT
&
aEvent
);
...
@@ -165,11 +165,13 @@ private:
...
@@ -165,11 +165,13 @@ private:
*/
*/
int
placeTextPcb
();
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
* Function make45DegLine()
///> current cursor position.
* Forces a DRAWSEGMENT to be drawn at multiple of 45 degrees. The origin stays the same,
///> @param aSegment is the segment that is currently drawn.
* the end of the aSegment is modified according to the current cursor position.
///> @param aHelper is a helper line that shows the next possible segment.
* @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
;
void
make45DegLine
(
DRAWSEGMENT
*
aSegment
,
DRAWSEGMENT
*
aHelper
)
const
;
///> Sets up handlers for various events.
///> 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