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
2a14f2d5
Commit
2a14f2d5
authored
Aug 12, 2010
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor code cleaning
parent
883d5b51
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
33 deletions
+30
-33
automove.cpp
pcbnew/automove.cpp
+30
-33
No files found.
pcbnew/automove.cpp
View file @
2a14f2d5
...
@@ -36,35 +36,12 @@ wxString ModulesMaskSelection = wxT( "*" );
...
@@ -36,35 +36,12 @@ wxString ModulesMaskSelection = wxT( "*" );
void
WinEDA_PcbFrame
::
AutoPlace
(
wxCommandEvent
&
event
)
void
WinEDA_PcbFrame
::
AutoPlace
(
wxCommandEvent
&
event
)
{
{
int
id
=
event
.
GetId
();
int
id
=
event
.
GetId
();
INSTALL_DC
(
dc
,
DrawPanel
);
bool
on_state
;
bool
on_state
;
if
(
m_HToolBar
==
NULL
)
if
(
m_HToolBar
==
NULL
)
return
;
return
;
switch
(
id
)
INSTALL_DC
(
dc
,
DrawPanel
);
{
case
ID_TOOLBARH_PCB_AUTOPLACE
:
case
ID_TOOLBARH_PCB_AUTOROUTE
:
break
;
case
ID_POPUP_CANCEL_CURRENT_COMMAND
:
if
(
DrawPanel
->
ManageCurseur
&&
DrawPanel
->
ForceCloseManageCurseur
)
{
DrawPanel
->
ForceCloseManageCurseur
(
DrawPanel
,
&
dc
);
}
break
;
default
:
// Abort a current command (if any)
DrawPanel
->
UnManageCursor
(
0
,
wxCURSOR_ARROW
);
break
;
}
/* Erase ratsnest if needed */
if
(
GetBoard
()
->
IsElementVisible
(
RATSNEST_VISIBLE
)
)
DrawGeneralRatsnest
(
&
dc
);
GetBoard
()
->
m_Status_Pcb
|=
DO_NOT_SHOW_GENERAL_RASTNEST
;
switch
(
id
)
switch
(
id
)
{
{
...
@@ -77,7 +54,7 @@ void WinEDA_PcbFrame::AutoPlace( wxCommandEvent& event )
...
@@ -77,7 +54,7 @@ void WinEDA_PcbFrame::AutoPlace( wxCommandEvent& event )
}
}
else
else
m_HTOOL_current_state
=
0
;
m_HTOOL_current_state
=
0
;
break
;
return
;
case
ID_TOOLBARH_PCB_AUTOROUTE
:
case
ID_TOOLBARH_PCB_AUTOROUTE
:
on_state
=
m_HToolBar
->
GetToolState
(
ID_TOOLBARH_PCB_AUTOROUTE
);
on_state
=
m_HToolBar
->
GetToolState
(
ID_TOOLBARH_PCB_AUTOROUTE
);
...
@@ -88,24 +65,48 @@ void WinEDA_PcbFrame::AutoPlace( wxCommandEvent& event )
...
@@ -88,24 +65,48 @@ void WinEDA_PcbFrame::AutoPlace( wxCommandEvent& event )
}
}
else
else
m_HTOOL_current_state
=
0
;
m_HTOOL_current_state
=
0
;
break
;
return
;
case
ID_POPUP_PCB_AUTOROUTE_SELECT_LAYERS
:
return
;
case
ID_POPUP_PCB_AUTOPLACE_FIXE_MODULE
:
case
ID_POPUP_PCB_AUTOPLACE_FIXE_MODULE
:
FixeModule
(
(
MODULE
*
)
GetScreen
()
->
GetCurItem
(),
TRUE
);
FixeModule
(
(
MODULE
*
)
GetScreen
()
->
GetCurItem
(),
TRUE
);
break
;
return
;
case
ID_POPUP_PCB_AUTOPLACE_FREE_MODULE
:
case
ID_POPUP_PCB_AUTOPLACE_FREE_MODULE
:
FixeModule
(
(
MODULE
*
)
GetScreen
()
->
GetCurItem
(),
FALSE
);
FixeModule
(
(
MODULE
*
)
GetScreen
()
->
GetCurItem
(),
FALSE
);
break
;
return
;
case
ID_POPUP_PCB_AUTOPLACE_FREE_ALL_MODULES
:
case
ID_POPUP_PCB_AUTOPLACE_FREE_ALL_MODULES
:
FixeModule
(
NULL
,
FALSE
);
FixeModule
(
NULL
,
FALSE
);
break
;
return
;
case
ID_POPUP_PCB_AUTOPLACE_FIXE_ALL_MODULES
:
case
ID_POPUP_PCB_AUTOPLACE_FIXE_ALL_MODULES
:
FixeModule
(
NULL
,
TRUE
);
FixeModule
(
NULL
,
TRUE
);
return
;
case
ID_POPUP_CANCEL_CURRENT_COMMAND
:
if
(
DrawPanel
->
ManageCurseur
&&
DrawPanel
->
ForceCloseManageCurseur
)
{
DrawPanel
->
ForceCloseManageCurseur
(
DrawPanel
,
&
dc
);
}
break
;
break
;
default
:
// Abort a current command (if any)
DrawPanel
->
UnManageCursor
(
0
,
wxCURSOR_ARROW
);
break
;
}
/* Erase ratsnest if needed */
if
(
GetBoard
()
->
IsElementVisible
(
RATSNEST_VISIBLE
)
)
DrawGeneralRatsnest
(
&
dc
);
GetBoard
()
->
m_Status_Pcb
|=
DO_NOT_SHOW_GENERAL_RASTNEST
;
switch
(
id
)
{
case
ID_POPUP_PCB_AUTOPLACE_CURRENT_MODULE
:
case
ID_POPUP_PCB_AUTOPLACE_CURRENT_MODULE
:
AutoPlaceModule
(
(
MODULE
*
)
GetScreen
()
->
GetCurItem
(),
AutoPlaceModule
(
(
MODULE
*
)
GetScreen
()
->
GetCurItem
(),
PLACE_1_MODULE
,
&
dc
);
PLACE_1_MODULE
,
&
dc
);
...
@@ -155,9 +156,6 @@ void WinEDA_PcbFrame::AutoPlace( wxCommandEvent& event )
...
@@ -155,9 +156,6 @@ void WinEDA_PcbFrame::AutoPlace( wxCommandEvent& event )
Reset_Noroutable
(
&
dc
);
Reset_Noroutable
(
&
dc
);
break
;
break
;
case
ID_POPUP_PCB_AUTOROUTE_SELECT_LAYERS
:
break
;
default
:
default
:
DisplayError
(
this
,
wxT
(
"AutoPlace command error"
)
);
DisplayError
(
this
,
wxT
(
"AutoPlace command error"
)
);
break
;
break
;
...
@@ -165,7 +163,6 @@ void WinEDA_PcbFrame::AutoPlace( wxCommandEvent& event )
...
@@ -165,7 +163,6 @@ void WinEDA_PcbFrame::AutoPlace( wxCommandEvent& event )
GetBoard
()
->
m_Status_Pcb
&=
~
DO_NOT_SHOW_GENERAL_RASTNEST
;
GetBoard
()
->
m_Status_Pcb
&=
~
DO_NOT_SHOW_GENERAL_RASTNEST
;
Compile_Ratsnest
(
&
dc
,
true
);
Compile_Ratsnest
(
&
dc
,
true
);
SetToolbars
();
}
}
...
...
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