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
9efbf020
Commit
9efbf020
authored
Apr 06, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add and translate some comments. fixed a problem in modedit (delete module in lib not working)
parent
71ca194b
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
5684 additions
and
4531 deletions
+5684
-4531
about_kicad.cpp
common/about_kicad.cpp
+1
-1
wxPcbStruct.h
include/wxPcbStruct.h
+24
-6
kicad.mo
internat/fr/kicad.mo
+0
-0
kicad.po
internat/fr/kicad.po
+5556
-4431
librairi.cpp
pcbnew/librairi.cpp
+4
-4
loadcmp.cpp
pcbnew/loadcmp.cpp
+45
-43
modedit.cpp
pcbnew/modedit.cpp
+51
-43
netlist.cpp
pcbnew/netlist.cpp
+2
-2
xchgmod.cpp
pcbnew/xchgmod.cpp
+1
-1
No files found.
common/about_kicad.cpp
View file @
9efbf020
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
#include "appl_wxstruct.h"
#include "appl_wxstruct.h"
#define BUILD_VERSION wxT("(20090
325
-unstable)")
#define BUILD_VERSION wxT("(20090
406
-unstable)")
wxString
g_BuildVersion
wxString
g_BuildVersion
...
...
include/wxPcbStruct.h
View file @
9efbf020
...
@@ -252,14 +252,32 @@ public:
...
@@ -252,14 +252,32 @@ public:
// loading footprints
// loading footprints
MODULE
*
Get_Librairie_Module
(
wxWindow
*
winaff
,
/** function Get_Librairie_Module
const
wxString
&
library
,
*
const
wxString
&
ModuleName
,
* Read active libraries or one library to find and load a given module
bool
show_msg_err
);
* If found the lodule is linked to the tail of linked list of modules
* @param aLibrary: the full filename of the library to read. If empty, all active libraries are read
* @param aModuleName = module name to load
* @param aDisplayMessageError = true to display an error message if any.
* @return a MODULE * pointer to the new module, or NULL
*
*/
MODULE
*
Get_Librairie_Module
(
const
wxString
&
aLibraryFullFilename
,
const
wxString
&
aModuleName
,
bool
aDisplayMessageError
);
/** Function Select_1_Module_From_List
* Display a list of modules found in active libraries or a given library
* @param aLibraryFullFilename = library to list (if aLibraryFullFilename == void, list all modules)
* @param aMask = Display filter (wildcart)( Mask = wxEmptyString if not used )
* @param aKeyWord = keyword list, to display a filtered list of module having one (or more) of these keyworks in their keywork list
* ( aKeyWord = wxEmptyString if not used )
*
* @return wxEmptyString if abort or fails, or the selected module name if Ok
*/
wxString
Select_1_Module_From_List
(
wxString
Select_1_Module_From_List
(
WinEDA_DrawFrame
*
active_window
,
const
wxString
&
Library
,
WinEDA_DrawFrame
*
active_window
,
const
wxString
&
aLibraryFullFilename
,
const
wxString
&
Mask
,
const
wxString
&
KeyWord
);
const
wxString
&
aMask
,
const
wxString
&
a
KeyWord
);
MODULE
*
Load_Module_From_Library
(
const
wxString
&
library
,
wxDC
*
DC
);
MODULE
*
Load_Module_From_Library
(
const
wxString
&
library
,
wxDC
*
DC
);
...
...
internat/fr/kicad.mo
View file @
9efbf020
No preview for this file type
internat/fr/kicad.po
View file @
9efbf020
This diff is collapsed.
Click to expand it.
pcbnew/librairi.cpp
View file @
9efbf020
...
@@ -213,7 +213,7 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib )
...
@@ -213,7 +213,7 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib )
/**********************************************************/
/**********************************************************/
void
WinEDA_ModuleEditFrame
::
Delete_Module_In_Library
(
const
void
WinEDA_ModuleEditFrame
::
Delete_Module_In_Library
(
const
wxString
&
l
ibname
)
wxString
&
aL
ibname
)
/**********************************************************/
/**********************************************************/
{
{
wxFileName
newFileName
;
wxFileName
newFileName
;
...
@@ -224,17 +224,17 @@ void WinEDA_ModuleEditFrame::Delete_Module_In_Library( const
...
@@ -224,17 +224,17 @@ void WinEDA_ModuleEditFrame::Delete_Module_In_Library( const
wxString
CmpName
,
msg
;
wxString
CmpName
,
msg
;
/* Demande du nom du composant a supprimer */
/* Demande du nom du composant a supprimer */
CmpName
=
Select_1_Module_From_List
(
this
,
l
ibname
,
wxEmptyString
,
wxEmptyString
);
CmpName
=
Select_1_Module_From_List
(
this
,
aL
ibname
,
wxEmptyString
,
wxEmptyString
);
if
(
CmpName
==
wxEmptyString
)
if
(
CmpName
==
wxEmptyString
)
return
;
return
;
/* Confirmation */
/* Confirmation */
msg
.
Printf
(
_
(
"Ok to delete module %s in library %s"
),
msg
.
Printf
(
_
(
"Ok to delete module %s in library %s"
),
CmpName
.
GetData
(),
l
ibname
.
GetData
()
);
CmpName
.
GetData
(),
aL
ibname
.
GetData
()
);
if
(
!
IsOK
(
this
,
msg
)
)
if
(
!
IsOK
(
this
,
msg
)
)
return
;
return
;
oldFileName
=
l
ibname
;
oldFileName
=
aL
ibname
;
if
(
(
lib_module
=
wxFopen
(
oldFileName
.
GetFullPath
(),
if
(
(
lib_module
=
wxFopen
(
oldFileName
.
GetFullPath
(),
wxT
(
"rt"
)
)
)
==
NULL
)
wxT
(
"rt"
)
)
)
==
NULL
)
...
...
pcbnew/loadcmp.cpp
View file @
9efbf020
...
@@ -133,7 +133,7 @@ MODULE* WinEDA_BasePcbFrame::Load_Module_From_Library( const wxString& library,
...
@@ -133,7 +133,7 @@ MODULE* WinEDA_BasePcbFrame::Load_Module_From_Library( const wxString& library,
}
}
}
}
module
=
Get_Librairie_Module
(
this
,
library
,
ModuleName
,
FALSE
);
module
=
Get_Librairie_Module
(
library
,
ModuleName
,
FALSE
);
if
(
(
module
==
NULL
)
&&
AllowWildSeach
)
/* Attemp to search with wildcard */
if
(
(
module
==
NULL
)
&&
AllowWildSeach
)
/* Attemp to search with wildcard */
{
{
...
@@ -147,7 +147,7 @@ MODULE* WinEDA_BasePcbFrame::Load_Module_From_Library( const wxString& library,
...
@@ -147,7 +147,7 @@ MODULE* WinEDA_BasePcbFrame::Load_Module_From_Library( const wxString& library,
return
NULL
;
/* annulation de commande */
return
NULL
;
/* annulation de commande */
}
}
else
else
module
=
Get_Librairie_Module
(
this
,
library
,
ModuleName
,
TRUE
);
module
=
Get_Librairie_Module
(
library
,
ModuleName
,
TRUE
);
}
}
GetScreen
()
->
m_Curseur
=
curspos
;
GetScreen
()
->
m_Curseur
=
curspos
;
...
@@ -170,21 +170,19 @@ MODULE* WinEDA_BasePcbFrame::Load_Module_From_Library( const wxString& library,
...
@@ -170,21 +170,19 @@ MODULE* WinEDA_BasePcbFrame::Load_Module_From_Library( const wxString& library,
}
}
/**
***************************************************************************
/**
function Get_Librairie_Module
*
*
* Analyse les LIBRAIRIES pour trouver le module demande
* Read active libraries or one library to find and load a given module
* Si ce module est trouve, le copie en memoire, et le
* If found the lodule is linked to the tail of linked list of modules
* chaine en fin de liste des modules
* @param aLibrary: the full filename of the library to read. If empty, all active libraries are read
* - Entree:
* @param aModuleName = module name to load
* name_cmp = nom du module
* @param aDisplayMessageError = true to display an error message if any.
* - Retour:
* @return a MODULE * pointer to the new module, or NULL
* Pointeur sur le nouveau module.
*
*
*****************************************************************************/
*/
MODULE
*
WinEDA_BasePcbFrame
::
Get_Librairie_Module
(
wxWindow
*
winaff
,
MODULE
*
WinEDA_BasePcbFrame
::
Get_Librairie_Module
(
const
wxString
&
aLibraryFullFilename
,
const
wxString
&
library
,
const
wxString
&
aModuleName
,
const
wxString
&
ModuleName
,
bool
aDisplayMessageError
)
bool
show_msg_err
)
{
{
int
LineNum
,
Found
=
0
;
int
LineNum
,
Found
=
0
;
wxFileName
fn
;
wxFileName
fn
;
...
@@ -194,11 +192,14 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module( wxWindow* winaff,
...
@@ -194,11 +192,14 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module( wxWindow* winaff,
MODULE
*
NewModule
;
MODULE
*
NewModule
;
FILE
*
file
=
NULL
;
FILE
*
file
=
NULL
;
unsigned
ii
;
unsigned
ii
;
bool
one_lib
=
aLibraryFullFilename
.
IsEmpty
()
?
false
:
true
;
for
(
ii
=
0
;
ii
<
g_LibName_List
.
GetCount
();
ii
++
)
for
(
ii
=
0
;
ii
<
g_LibName_List
.
GetCount
();
ii
++
)
{
{
fn
=
wxFileName
(
wxEmptyString
,
g_LibName_List
[
ii
],
if
(
one_lib
)
ModuleFileExtension
);
fn
=
aLibraryFullFilename
;
else
fn
=
wxFileName
(
wxEmptyString
,
g_LibName_List
[
ii
],
ModuleFileExtension
);
tmp
=
wxGetApp
().
GetLibraryPathList
().
FindValidPath
(
fn
.
GetFullName
()
);
tmp
=
wxGetApp
().
GetLibraryPathList
().
FindValidPath
(
fn
.
GetFullName
()
);
...
@@ -253,7 +254,7 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module( wxWindow* winaff,
...
@@ -253,7 +254,7 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module( wxWindow* winaff,
break
;
break
;
StrPurge
(
Line
);
StrPurge
(
Line
);
msg
=
CONV_FROM_UTF8
(
Line
);
msg
=
CONV_FROM_UTF8
(
Line
);
if
(
msg
.
CmpNoCase
(
ModuleName
)
==
0
)
if
(
msg
.
CmpNoCase
(
a
ModuleName
)
==
0
)
{
{
Found
=
1
;
Found
=
1
;
break
;
/* Trouve! */
break
;
/* Trouve! */
...
@@ -274,7 +275,7 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module( wxWindow* winaff,
...
@@ -274,7 +275,7 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module( wxWindow* winaff,
/* Lecture du nom du composant */
/* Lecture du nom du composant */
Name
=
CONV_FROM_UTF8
(
Line
+
8
);
Name
=
CONV_FROM_UTF8
(
Line
+
8
);
if
(
Name
.
CmpNoCase
(
ModuleName
)
==
0
)
/* composant localise */
if
(
Name
.
CmpNoCase
(
a
ModuleName
)
==
0
)
/* composant localise */
{
{
NewModule
=
new
MODULE
(
GetBoard
()
);
NewModule
=
new
MODULE
(
GetBoard
()
);
...
@@ -291,12 +292,15 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module( wxWindow* winaff,
...
@@ -291,12 +292,15 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module( wxWindow* winaff,
}
}
fclose
(
file
);
fclose
(
file
);
if
(
one_lib
)
break
;
}
}
if
(
show_msg_er
r
)
if
(
aDisplayMessageErro
r
)
{
{
msg
.
Printf
(
_
(
"Module <%s> not found"
),
ModuleName
.
c_str
()
);
msg
.
Printf
(
_
(
"Module <%s> not found"
),
a
ModuleName
.
c_str
()
);
DisplayError
(
winaff
,
msg
);
DisplayError
(
NULL
,
msg
);
}
}
return
NULL
;
return
NULL
;
...
@@ -306,19 +310,18 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module( wxWindow* winaff,
...
@@ -306,19 +310,18 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module( wxWindow* winaff,
/***************************************************************/
/***************************************************************/
wxString
WinEDA_BasePcbFrame
::
Select_1_Module_From_List
(
wxString
WinEDA_BasePcbFrame
::
Select_1_Module_From_List
(
WinEDA_DrawFrame
*
active_window
,
WinEDA_DrawFrame
*
active_window
,
const
wxString
&
Library
,
const
wxString
&
aLibraryFullFilename
,
const
wxString
&
Mask
,
const
wxString
&
KeyWord
)
const
wxString
&
aMask
,
const
wxString
&
a
KeyWord
)
/***************************************************************/
/***************************************************************/
/*
/*
* Function Select_1_Module_From_List
*
Affiche la liste des modules des librairies
*
Display a list of modules found in active libraries or a given library
*
Recherche dans la librairie Library ou generale si Library == NULL
*
@param aLibraryFullFilename = library to list (if aLibraryFullFilename == void, list all modules)
*
Mask = Filtre d'affichage( Mask = wxEmptyString pour listage non filtr
)
*
@param aMask = Display filter (wildcart)( Mask = wxEmptyString if not used
)
*
KeyWord = Liste de mots cles, Recherche limitee aux composants
*
@param aKeyWord = keyword list, to display a filtered list of module having one (or more) of these keyworks in their keywork list
*
ayant ces mots cles ( KeyWord = wxEmptyString pour listage de tous les modules
)
*
( aKeyWord = wxEmptyString if not used
)
*
*
* retourne wxEmptyString si abort ou probleme
* @return wxEmptyString if abort or fails, or the selected module name if Ok
* ou le nom du module
*/
*/
{
{
int
LineNum
;
int
LineNum
;
...
@@ -341,14 +344,13 @@ wxString WinEDA_BasePcbFrame::Select_1_Module_From_List(
...
@@ -341,14 +344,13 @@ wxString WinEDA_BasePcbFrame::Select_1_Module_From_List(
for
(
ii
=
0
;
ii
<
g_LibName_List
.
GetCount
();
ii
++
)
for
(
ii
=
0
;
ii
<
g_LibName_List
.
GetCount
();
ii
++
)
{
{
/* Calcul du nom complet de la librairie */
/* Calcul du nom complet de la librairie */
if
(
Library
.
IsEmpty
()
)
if
(
aLibraryFullFilename
.
IsEmpty
()
)
{
{
fn
=
wxFileName
(
wxEmptyString
,
g_LibName_List
[
ii
],
fn
=
wxFileName
(
wxEmptyString
,
g_LibName_List
[
ii
],
ModuleFileExtension
);
ModuleFileExtension
);
}
}
else
else
fn
=
wxFileName
(
wxEmptyString
,
Library
,
ModuleFileExtension
);
fn
=
aLibraryFullFilename
;
tmp
=
wxGetApp
().
GetLibraryPathList
().
FindValidPath
(
fn
.
GetFullName
()
);
tmp
=
wxGetApp
().
GetLibraryPathList
().
FindValidPath
(
fn
.
GetFullName
()
);
...
@@ -363,10 +365,10 @@ wxString WinEDA_BasePcbFrame::Select_1_Module_From_List(
...
@@ -363,10 +365,10 @@ wxString WinEDA_BasePcbFrame::Select_1_Module_From_List(
ReadDocLib
(
tmp
);
ReadDocLib
(
tmp
);
if
(
!
KeyWord
.
IsEmpty
()
)
/* Inutile de lire la librairie si selection
if
(
!
a
KeyWord
.
IsEmpty
()
)
/* Inutile de lire la librairie si selection
* par mots cles, deja lus */
* par mots cles, deja lus */
{
{
if
(
!
Library
.
IsEmpty
()
)
if
(
!
aLibraryFullFilename
.
IsEmpty
()
)
break
;
break
;
continue
;
continue
;
}
}
...
@@ -375,7 +377,7 @@ wxString WinEDA_BasePcbFrame::Select_1_Module_From_List(
...
@@ -375,7 +377,7 @@ wxString WinEDA_BasePcbFrame::Select_1_Module_From_List(
if
(
file
==
NULL
)
if
(
file
==
NULL
)
{
{
if
(
!
Library
.
IsEmpty
()
)
if
(
!
aLibraryFullFilename
.
IsEmpty
()
)
break
;
break
;
continue
;
continue
;
}
}
...
@@ -413,12 +415,12 @@ wxString WinEDA_BasePcbFrame::Select_1_Module_From_List(
...
@@ -413,12 +415,12 @@ wxString WinEDA_BasePcbFrame::Select_1_Module_From_List(
break
;
break
;
strupper
(
Line
);
strupper
(
Line
);
msg
=
CONV_FROM_UTF8
(
StrPurge
(
Line
)
);
msg
=
CONV_FROM_UTF8
(
StrPurge
(
Line
)
);
if
(
Mask
.
IsEmpty
()
)
if
(
a
Mask
.
IsEmpty
()
)
{
{
ListBox
->
Append
(
msg
);
ListBox
->
Append
(
msg
);
NbModules
++
;
NbModules
++
;
}
}
else
if
(
WildCompareString
(
Mask
,
msg
,
FALSE
)
)
else
if
(
WildCompareString
(
a
Mask
,
msg
,
FALSE
)
)
{
{
ListBox
->
Append
(
msg
);
ListBox
->
Append
(
msg
);
NbModules
++
;
NbModules
++
;
...
@@ -431,17 +433,17 @@ wxString WinEDA_BasePcbFrame::Select_1_Module_From_List(
...
@@ -431,17 +433,17 @@ wxString WinEDA_BasePcbFrame::Select_1_Module_From_List(
fclose
(
file
);
fclose
(
file
);
file
=
NULL
;
file
=
NULL
;
if
(
!
Library
.
IsEmpty
()
)
if
(
!
aLibraryFullFilename
.
IsEmpty
()
)
break
;
break
;
}
}
/* creation de la liste des modules si recherche par mots-cles */
/* creation de la liste des modules si recherche par mots-cles */
if
(
!
KeyWord
.
IsEmpty
()
)
if
(
!
a
KeyWord
.
IsEmpty
()
)
{
{
ModList
*
ItemMod
=
MList
;
ModList
*
ItemMod
=
MList
;
while
(
ItemMod
!=
NULL
)
while
(
ItemMod
!=
NULL
)
{
{
if
(
KeyWordOk
(
KeyWord
,
ItemMod
->
m_KeyWord
)
)
if
(
KeyWordOk
(
a
KeyWord
,
ItemMod
->
m_KeyWord
)
)
{
{
NbModules
++
;
NbModules
++
;
ListBox
->
Append
(
ItemMod
->
m_Name
);
ListBox
->
Append
(
ItemMod
->
m_Name
);
...
...
pcbnew/modedit.cpp
View file @
9efbf020
...
@@ -69,20 +69,19 @@ BOARD_ITEM* WinEDA_ModuleEditFrame::ModeditLocateAndDisplay( int aHotKeyCode )
...
@@ -69,20 +69,19 @@ BOARD_ITEM* WinEDA_ModuleEditFrame::ModeditLocateAndDisplay( int aHotKeyCode )
item
=
(
*
m_Collector
)[
0
];
item
=
(
*
m_Collector
)[
0
];
SetCurItem
(
item
);
SetCurItem
(
item
);
}
}
else
// we can't figure out which item user wants, do popup menu so user can choose
else
// we can't figure out which item user wants, do popup menu so user can choose
{
{
wxMenu
itemMenu
;
wxMenu
itemMenu
;
/* Give a title to the selection menu. This is also a cancel menu item */
/* Give a title to the selection menu. This is also a cancel menu item */
wxMenuItem
*
item_title
=
new
wxMenuItem
(
&
itemMenu
,
-
1
,
_
(
"Selection Clarification"
)
);
wxMenuItem
*
item_title
=
new
wxMenuItem
(
&
itemMenu
,
-
1
,
_
(
"Selection Clarification"
)
);
#ifdef __WINDOWS__
#ifdef __WINDOWS__
wxFont
bold_font
(
*
wxNORMAL_FONT
);
wxFont
bold_font
(
*
wxNORMAL_FONT
);
bold_font
.
SetWeight
(
wxFONTWEIGHT_BOLD
);
bold_font
.
SetWeight
(
wxFONTWEIGHT_BOLD
);
bold_font
.
SetStyle
(
wxFONTSTYLE_ITALIC
);
bold_font
.
SetStyle
(
wxFONTSTYLE_ITALIC
);
item_title
->
SetFont
(
bold_font
);
item_title
->
SetFont
(
bold_font
);
#endif
#endif
itemMenu
.
Append
(
item_title
);
itemMenu
.
Append
(
item_title
);
itemMenu
.
AppendSeparator
();
itemMenu
.
AppendSeparator
();
int
limit
=
MIN
(
MAX_ITEMS_IN_PICKER
,
m_Collector
->
GetCount
()
);
int
limit
=
MIN
(
MAX_ITEMS_IN_PICKER
,
m_Collector
->
GetCount
()
);
...
@@ -122,7 +121,6 @@ BOARD_ITEM* WinEDA_ModuleEditFrame::ModeditLocateAndDisplay( int aHotKeyCode )
...
@@ -122,7 +121,6 @@ BOARD_ITEM* WinEDA_ModuleEditFrame::ModeditLocateAndDisplay( int aHotKeyCode )
}
}
/****************************************************************************/
/****************************************************************************/
void
WinEDA_ModuleEditFrame
::
Process_Special_Functions
(
wxCommandEvent
&
event
)
void
WinEDA_ModuleEditFrame
::
Process_Special_Functions
(
wxCommandEvent
&
event
)
/****************************************************************************/
/****************************************************************************/
...
@@ -205,10 +203,10 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -205,10 +203,10 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
{
{
wxFileName
fn
=
wxFileName
(
wxEmptyString
,
m_CurrentLib
,
wxFileName
fn
=
wxFileName
(
wxEmptyString
,
m_CurrentLib
,
ModuleFileExtension
);
ModuleFileExtension
);
wxString
tmp
=
wxString
full_libraryfilename
=
wxGetApp
().
GetLibraryPathList
().
FindValidPath
(
fn
.
GetFullName
()
);
wxGetApp
().
GetLibraryPathList
().
FindValidPath
(
fn
.
GetFullName
()
);
if
(
wxFileName
::
FileExists
(
tmp
)
)
if
(
wxFileName
::
FileExists
(
full_libraryfilename
)
)
Delete_Module_In_Library
(
tmp
);
Delete_Module_In_Library
(
full_libraryfilename
);
break
;
break
;
}
}
...
@@ -220,9 +218,9 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -220,9 +218,9 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
GetScreen
()
->
m_Curseur
=
wxPoint
(
0
,
0
);
GetScreen
()
->
m_Curseur
=
wxPoint
(
0
,
0
);
MODULE
*
module
=
Create_1_Module
(
&
dc
,
wxEmptyString
);
MODULE
*
module
=
Create_1_Module
(
&
dc
,
wxEmptyString
);
if
(
module
)
// i.e. if create module command not aborted
if
(
module
)
// i.e. if create module command not aborted
{
{
module
->
SetPosition
(
wxPoint
(
0
,
0
)
);
module
->
SetPosition
(
wxPoint
(
0
,
0
)
);
if
(
GetBoard
()
->
m_Modules
)
if
(
GetBoard
()
->
m_Modules
)
GetBoard
()
->
m_Modules
->
m_Flags
=
0
;
GetBoard
()
->
m_Modules
->
m_Flags
=
0
;
Zoom_Automatique
(
true
);
Zoom_Automatique
(
true
);
...
@@ -346,11 +344,21 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -346,11 +344,21 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
break
;
break
;
case
ID_MODEDIT_LOAD_MODULE
:
case
ID_MODEDIT_LOAD_MODULE
:
{
wxString
full_libraryfilename
;
if
(
!
m_CurrentLib
.
IsEmpty
()
)
{
wxFileName
fn
=
wxFileName
(
wxEmptyString
,
m_CurrentLib
,
ModuleFileExtension
);
full_libraryfilename
=
wxGetApp
().
GetLibraryPathList
().
FindValidPath
(
fn
.
GetFullName
()
);
}
GetScreen
()
->
ClearUndoRedoList
();
GetScreen
()
->
ClearUndoRedoList
();
SetCurItem
(
NULL
);
SetCurItem
(
NULL
);
Clear_Pcb
(
true
);
Clear_Pcb
(
true
);
GetScreen
()
->
m_Curseur
=
wxPoint
(
0
,
0
);
GetScreen
()
->
m_Curseur
=
wxPoint
(
0
,
0
);
Load_Module_From_Library
(
m_CurrentLib
,
&
dc
);
Load_Module_From_Library
(
full_libraryfilename
,
&
dc
);
}
if
(
GetBoard
()
->
m_Modules
)
if
(
GetBoard
()
->
m_Modules
)
GetBoard
()
->
m_Modules
->
m_Flags
=
0
;
GetBoard
()
->
m_Modules
->
m_Flags
=
0
;
...
...
pcbnew/netlist.cpp
View file @
9efbf020
...
@@ -491,7 +491,7 @@ MODULE* ReadNetModule( WinEDA_PcbFrame* aFrame,
...
@@ -491,7 +491,7 @@ MODULE* ReadNetModule( WinEDA_PcbFrame* aFrame,
if
(
aChangeFootprint
)
if
(
aChangeFootprint
)
{
{
MODULE
*
NewModule
=
MODULE
*
NewModule
=
aFrame
->
Get_Librairie_Module
(
NULL
,
wxEmptyString
,
NameLibCmp
,
TRUE
);
aFrame
->
Get_Librairie_Module
(
wxEmptyString
,
NameLibCmp
,
TRUE
);
if
(
NewModule
)
/* Nouveau module trouve : changement de module */
if
(
NewModule
)
/* Nouveau module trouve : changement de module */
Module
=
aFrame
->
Exchange_Module
(
NULL
,
Module
,
NewModule
);
Module
=
aFrame
->
Exchange_Module
(
NULL
,
Module
,
NewModule
);
}
}
...
@@ -1036,7 +1036,7 @@ void LoadListeModules( WinEDA_PcbFrame* aPcbFrame, wxDC* DC )
...
@@ -1036,7 +1036,7 @@ void LoadListeModules( WinEDA_PcbFrame* aPcbFrame, wxDC* DC )
if
(
(
ii
==
0
)
||
(
ref
->
m_LibName
!=
cmp
->
m_LibName
)
)
if
(
(
ii
==
0
)
||
(
ref
->
m_LibName
!=
cmp
->
m_LibName
)
)
{
{
/* New footprint : must be loaded from a library */
/* New footprint : must be loaded from a library */
Module
=
aPcbFrame
->
Get_Librairie_Module
(
NULL
,
wxEmptyString
,
cmp
->
m_LibName
,
FALSE
);
Module
=
aPcbFrame
->
Get_Librairie_Module
(
wxEmptyString
,
cmp
->
m_LibName
,
FALSE
);
ref
=
cmp
;
ref
=
cmp
;
if
(
Module
==
NULL
)
if
(
Module
==
NULL
)
{
{
...
...
pcbnew/xchgmod.cpp
View file @
9efbf020
...
@@ -494,7 +494,7 @@ MODULE* WinEDA_ExchangeModuleFrame::Change_1_Module( MODULE* Module,
...
@@ -494,7 +494,7 @@ MODULE* WinEDA_ExchangeModuleFrame::Change_1_Module( MODULE* Module,
namecmp
.
Trim
(
TRUE
);
namecmp
.
Trim
(
TRUE
);
namecmp
.
Trim
(
FALSE
);
namecmp
.
Trim
(
FALSE
);
NewModule
=
m_Parent
->
Get_Librairie_Module
(
this
,
wxEmptyString
,
namecmp
,
ShowError
);
NewModule
=
m_Parent
->
Get_Librairie_Module
(
wxEmptyString
,
namecmp
,
ShowError
);
if
(
NewModule
==
NULL
)
/* Nouveau module NON trouve, reaffichage de l'ancien */
if
(
NewModule
==
NULL
)
/* Nouveau module NON trouve, reaffichage de l'ancien */
{
{
m_WinMsg
->
WriteText
(
wxT
(
"No
\n
"
)
);
m_WinMsg
->
WriteText
(
wxT
(
"No
\n
"
)
);
...
...
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