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
34f7cbc6
Commit
34f7cbc6
authored
Feb 14, 2013
by
marco.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MacOSX: now autoplace is drawn correctly
parent
3217bb59
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
2 deletions
+14
-2
autoplac.cpp
pcbnew/autorouter/autoplac.cpp
+6
-2
board_undo_redo.cpp
pcbnew/board_undo_redo.cpp
+4
-0
editedge.cpp
pcbnew/editedge.cpp
+4
-0
No files found.
pcbnew/autorouter/autoplac.cpp
View file @
34f7cbc6
...
@@ -673,18 +673,21 @@ int PCB_EDIT_FRAME::GetOptimalModulePlacement( MODULE* aModule, wxDC* aDC )
...
@@ -673,18 +673,21 @@ int PCB_EDIT_FRAME::GetOptimalModulePlacement( MODULE* aModule, wxDC* aDC )
for
(
;
CurrPosition
.
y
<
RoutingMatrix
.
m_BrdBox
.
GetBottom
()
-
fy
;
for
(
;
CurrPosition
.
y
<
RoutingMatrix
.
m_BrdBox
.
GetBottom
()
-
fy
;
CurrPosition
.
y
+=
RoutingMatrix
.
m_GridRouting
)
CurrPosition
.
y
+=
RoutingMatrix
.
m_GridRouting
)
{
{
#ifndef USE_WX_OVERLAY
/* Erase traces. */
/* Erase traces. */
DrawModuleOutlines
(
m_canvas
,
aDC
,
aModule
);
DrawModuleOutlines
(
m_canvas
,
aDC
,
aModule
);
if
(
showRat
)
if
(
showRat
)
Compute_Ratsnest_PlaceModule
(
aDC
);
Compute_Ratsnest_PlaceModule
(
aDC
);
#endif
showRat
=
0
;
showRat
=
0
;
aModule
->
m_BoundaryBox
.
SetX
(
ox
+
CurrPosition
.
x
);
aModule
->
m_BoundaryBox
.
SetX
(
ox
+
CurrPosition
.
x
);
aModule
->
m_BoundaryBox
.
SetY
(
oy
+
CurrPosition
.
y
);
aModule
->
m_BoundaryBox
.
SetY
(
oy
+
CurrPosition
.
y
);
g_Offset_Module
.
y
=
cy
-
CurrPosition
.
y
;
g_Offset_Module
.
y
=
cy
-
CurrPosition
.
y
;
#ifndef USE_WX_OVERLAY
DrawModuleOutlines
(
m_canvas
,
aDC
,
aModule
);
DrawModuleOutlines
(
m_canvas
,
aDC
,
aModule
);
#endif
keepOut
=
TstModuleOnBoard
(
GetBoard
(),
aModule
,
TstOtherSide
);
keepOut
=
TstModuleOnBoard
(
GetBoard
(),
aModule
,
TstOtherSide
);
if
(
keepOut
>=
0
)
// i.e. if the module can be put here
if
(
keepOut
>=
0
)
// i.e. if the module can be put here
...
@@ -918,11 +921,12 @@ double PCB_EDIT_FRAME::Compute_Ratsnest_PlaceModule( wxDC* DC )
...
@@ -918,11 +921,12 @@ double PCB_EDIT_FRAME::Compute_Ratsnest_PlaceModule( wxDC* DC )
start
=
pt_local_rats_nest
->
m_PadStart
->
GetPosition
()
-
g_Offset_Module
;
start
=
pt_local_rats_nest
->
m_PadStart
->
GetPosition
()
-
g_Offset_Module
;
end
=
pt_local_rats_nest
->
m_PadEnd
->
GetPosition
();
end
=
pt_local_rats_nest
->
m_PadEnd
->
GetPosition
();
#ifndef USE_WX_OVERLAY
if
(
AutoPlaceShowAll
)
if
(
AutoPlaceShowAll
)
{
{
GRLine
(
m_canvas
->
GetClipBox
(),
DC
,
start
,
end
,
0
,
color
);
GRLine
(
m_canvas
->
GetClipBox
(),
DC
,
start
,
end
,
0
,
color
);
}
}
#endif
/* Cost of the ratsnest. */
/* Cost of the ratsnest. */
dx
=
end
.
x
-
start
.
x
;
dx
=
end
.
x
-
start
.
x
;
dy
=
end
.
y
-
start
.
y
;
dy
=
end
.
y
-
start
.
y
;
...
...
pcbnew/board_undo_redo.cpp
View file @
34f7cbc6
...
@@ -352,6 +352,10 @@ void PCB_EDIT_FRAME::SaveCopyInUndoList( BOARD_ITEM* aItem,
...
@@ -352,6 +352,10 @@ void PCB_EDIT_FRAME::SaveCopyInUndoList( BOARD_ITEM* aItem,
case
UR_NEW
:
case
UR_NEW
:
case
UR_DELETED
:
case
UR_DELETED
:
#ifdef USE_WX_OVERLAY
#ifdef USE_WX_OVERLAY
// Avoid to redraw when autoplacing
if
(
aItem
->
Type
()
==
PCB_MODULE_T
)
if
(
((
MODULE
*
)
aItem
)
->
GetFlags
()
&
MODULE_to_PLACE
)
break
;
m_canvas
->
Refresh
();
m_canvas
->
Refresh
();
#endif
#endif
case
UR_MOVED
:
case
UR_MOVED
:
...
...
pcbnew/editedge.cpp
View file @
34f7cbc6
...
@@ -225,6 +225,10 @@ static void Abort_EditEdge( EDA_DRAW_PANEL* Panel, wxDC* DC )
...
@@ -225,6 +225,10 @@ static void Abort_EditEdge( EDA_DRAW_PANEL* Panel, wxDC* DC )
Segment
->
Draw
(
Panel
,
DC
,
GR_OR
);
Segment
->
Draw
(
Panel
,
DC
,
GR_OR
);
}
}
#ifdef USE_WX_OVERLAY
Panel
->
Refresh
();
#endif
Panel
->
SetMouseCapture
(
NULL
,
NULL
);
Panel
->
SetMouseCapture
(
NULL
,
NULL
);
(
(
PCB_EDIT_FRAME
*
)
Panel
->
GetParent
()
)
->
SetCurItem
(
NULL
);
(
(
PCB_EDIT_FRAME
*
)
Panel
->
GetParent
()
)
->
SetCurItem
(
NULL
);
}
}
...
...
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