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
e8cb60f9
Commit
e8cb60f9
authored
Oct 23, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor changes
parent
c03abc0b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
12 deletions
+15
-12
edit_component_in_lib.cpp
eeschema/edit_component_in_lib.cpp
+5
-0
wxPcbStruct.h
include/wxPcbStruct.h
+1
-1
automove.cpp
pcbnew/automove.cpp
+9
-11
No files found.
eeschema/edit_component_in_lib.cpp
View file @
e8cb60f9
...
@@ -445,6 +445,11 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::BrowseAndSelectDocFile( wxCommandEvent& e
...
@@ -445,6 +445,11 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::BrowseAndSelectDocFile( wxCommandEvent& e
wxGetApp
().
SaveLastVisitedLibraryPath
(
fn
.
GetPath
()
);
wxGetApp
().
SaveLastVisitedLibraryPath
(
fn
.
GetPath
()
);
filename
=
wxGetApp
().
ReturnFilenameWithRelativePathInLibPath
(
FullFileName
);
filename
=
wxGetApp
().
ReturnFilenameWithRelativePathInLibPath
(
FullFileName
);
// Filenames are always stored in unix like mode, ie separator "\" is stored as "/"
// to ensure files are identical under unices and windows
#ifdef __WINDOWS__
filename
.
Replace
(
wxT
(
"
\\
"
),
wxT
(
"/"
)
);
#endif
m_Docfile
->
SetValue
(
filename
);
m_Docfile
->
SetValue
(
filename
);
}
}
...
...
include/wxPcbStruct.h
View file @
e8cb60f9
...
@@ -642,7 +642,7 @@ public:
...
@@ -642,7 +642,7 @@ public:
void
ReOrientModules
(
const
wxString
&
ModuleMask
,
int
Orient
,
void
ReOrientModules
(
const
wxString
&
ModuleMask
,
int
Orient
,
bool
include_fixe
);
bool
include_fixe
);
void
FixeModule
(
MODULE
*
Module
,
bool
Fixe
);
void
FixeModule
(
MODULE
*
Module
,
bool
Fixe
);
void
AutoMoveModulesOnPcb
(
wxDC
*
DC
,
bool
PlaceModulesHorsPcb
);
void
AutoMoveModulesOnPcb
(
bool
PlaceModulesHorsPcb
);
bool
SetBoardBoundaryBoxFromEdgesOnly
();
bool
SetBoardBoundaryBoxFromEdgesOnly
();
void
AutoPlaceModule
(
MODULE
*
Module
,
int
place_mode
,
wxDC
*
DC
);
void
AutoPlaceModule
(
MODULE
*
Module
,
int
place_mode
,
wxDC
*
DC
);
int
RecherchePlacementModule
(
MODULE
*
Module
,
wxDC
*
DC
);
int
RecherchePlacementModule
(
MODULE
*
Module
,
wxDC
*
DC
);
...
...
pcbnew/automove.cpp
View file @
e8cb60f9
...
@@ -40,7 +40,7 @@ wxString ModulesMaskSelection = wxT( "*" );
...
@@ -40,7 +40,7 @@ wxString ModulesMaskSelection = wxT( "*" );
void
WinEDA_PcbFrame
::
AutoPlace
(
wxCommandEvent
&
event
)
void
WinEDA_PcbFrame
::
AutoPlace
(
wxCommandEvent
&
event
)
/******************************************************/
/******************************************************/
/*
Traite les selections d'outils et les commandes appelees du menu POPUP
/*
Called on events (popup menus) relative to automove and autoplace footprints
*/
*/
{
{
int
id
=
event
.
GetId
();
int
id
=
event
.
GetId
();
...
@@ -55,7 +55,7 @@ void WinEDA_PcbFrame::AutoPlace( wxCommandEvent& event )
...
@@ -55,7 +55,7 @@ void WinEDA_PcbFrame::AutoPlace( wxCommandEvent& event )
wxGetMousePosition
(
&
pos
.
x
,
&
pos
.
y
);
wxGetMousePosition
(
&
pos
.
x
,
&
pos
.
y
);
switch
(
id
)
// Arret eventuel de la commande de dplacement en cours
switch
(
id
)
{
{
case
ID_TOOLBARH_PCB_AUTOPLACE
:
case
ID_TOOLBARH_PCB_AUTOPLACE
:
case
ID_TOOLBARH_PCB_AUTOROUTE
:
case
ID_TOOLBARH_PCB_AUTOROUTE
:
...
@@ -69,7 +69,7 @@ void WinEDA_PcbFrame::AutoPlace( wxCommandEvent& event )
...
@@ -69,7 +69,7 @@ void WinEDA_PcbFrame::AutoPlace( wxCommandEvent& event )
}
}
break
;
break
;
default
:
// Arret de la commande de dplacement en cours
default
:
// Abort a current command (if any)
if
(
DrawPanel
->
ManageCurseur
if
(
DrawPanel
->
ManageCurseur
&&
DrawPanel
->
ForceCloseManageCurseur
)
&&
DrawPanel
->
ForceCloseManageCurseur
)
{
{
...
@@ -84,7 +84,7 @@ void WinEDA_PcbFrame::AutoPlace( wxCommandEvent& event )
...
@@ -84,7 +84,7 @@ void WinEDA_PcbFrame::AutoPlace( wxCommandEvent& event )
DrawGeneralRatsnest
(
&
dc
);
DrawGeneralRatsnest
(
&
dc
);
GetBoard
()
->
m_Status_Pcb
|=
DO_NOT_SHOW_GENERAL_RASTNEST
;
GetBoard
()
->
m_Status_Pcb
|=
DO_NOT_SHOW_GENERAL_RASTNEST
;
switch
(
id
)
// Traitement des commandes
switch
(
id
)
{
{
case
ID_TOOLBARH_PCB_AUTOPLACE
:
case
ID_TOOLBARH_PCB_AUTOPLACE
:
on_state
=
m_HToolBar
->
GetToolState
(
ID_TOOLBARH_PCB_AUTOPLACE
);
on_state
=
m_HToolBar
->
GetToolState
(
ID_TOOLBARH_PCB_AUTOPLACE
);
...
@@ -142,11 +142,11 @@ void WinEDA_PcbFrame::AutoPlace( wxCommandEvent& event )
...
@@ -142,11 +142,11 @@ void WinEDA_PcbFrame::AutoPlace( wxCommandEvent& event )
break
;
break
;
case
ID_POPUP_PCB_AUTOMOVE_ALL_MODULES
:
case
ID_POPUP_PCB_AUTOMOVE_ALL_MODULES
:
AutoMoveModulesOnPcb
(
&
dc
,
FALSE
);
AutoMoveModulesOnPcb
(
FALSE
);
break
;
break
;
case
ID_POPUP_PCB_AUTOMOVE_NEW_MODULES
:
case
ID_POPUP_PCB_AUTOMOVE_NEW_MODULES
:
AutoMoveModulesOnPcb
(
&
dc
,
TRUE
);
AutoMoveModulesOnPcb
(
TRUE
);
break
;
break
;
case
ID_POPUP_PCB_REORIENT_ALL_MODULES
:
case
ID_POPUP_PCB_REORIENT_ALL_MODULES
:
...
@@ -188,7 +188,7 @@ void WinEDA_PcbFrame::AutoPlace( wxCommandEvent& event )
...
@@ -188,7 +188,7 @@ void WinEDA_PcbFrame::AutoPlace( wxCommandEvent& event )
/*****************************************************************************/
/*****************************************************************************/
void
WinEDA_PcbFrame
::
AutoMoveModulesOnPcb
(
wxDC
*
DC
,
bool
PlaceModulesHorsPcb
)
void
WinEDA_PcbFrame
::
AutoMoveModulesOnPcb
(
bool
PlaceModulesHorsPcb
)
/*****************************************************************************/
/*****************************************************************************/
/* Routine de repartition des composants dans un rectangle de format 4 / 3,
/* Routine de repartition des composants dans un rectangle de format 4 / 3,
...
@@ -259,7 +259,6 @@ void WinEDA_PcbFrame::AutoMoveModulesOnPcb( wxDC* DC, bool PlaceModulesHorsPcb )
...
@@ -259,7 +259,6 @@ void WinEDA_PcbFrame::AutoMoveModulesOnPcb( wxDC* DC, bool PlaceModulesHorsPcb )
Xsize_allowed
=
(
int
)
(
sqrt
(
surface
)
*
4.0
/
3.0
);
Xsize_allowed
=
(
int
)
(
sqrt
(
surface
)
*
4.0
/
3.0
);
/* Placement des modules */
start
=
current
=
GetScreen
()
->
m_Curseur
;
start
=
current
=
GetScreen
()
->
m_Curseur
;
Ymax_size
=
0
;
Ymax_size
=
0
;
...
@@ -290,14 +289,13 @@ void WinEDA_PcbFrame::AutoMoveModulesOnPcb( wxDC* DC, bool PlaceModulesHorsPcb )
...
@@ -290,14 +289,13 @@ void WinEDA_PcbFrame::AutoMoveModulesOnPcb( wxDC* DC, bool PlaceModulesHorsPcb )
PutOnGrid
(
&
GetScreen
()
->
m_Curseur
);
PutOnGrid
(
&
GetScreen
()
->
m_Curseur
);
Module
->
Draw
(
DrawPanel
,
DC
,
GR_XOR
);
Place_Module
(
Module
,
NULL
,
true
);
Place_Module
(
Module
,
DC
);
/* positionne Module et recalcule cadre */
current
.
x
+=
Module
->
m_RealBoundaryBox
.
GetWidth
()
+
pas_grille
;
current
.
x
+=
Module
->
m_RealBoundaryBox
.
GetWidth
()
+
pas_grille
;
}
}
MyFree
(
BaseListeModules
);
MyFree
(
BaseListeModules
);
GetScreen
()
->
SetRefreshReq
();
DrawPanel
->
Refresh
();
}
}
...
...
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