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
ae3c3b6c
Commit
ae3c3b6c
authored
Nov 10, 2008
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcbnew: solved a bug which crashes pcbnew when creating a new module with no reference.
parent
52340497
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3756 additions
and
3150 deletions
+3756
-3150
kicad.mo
internat/fr/kicad.mo
+0
-0
kicad.po
internat/fr/kicad.po
+3737
-3131
librairi.cpp
pcbnew/librairi.cpp
+12
-13
modedit.cpp
pcbnew/modedit.cpp
+7
-6
No files found.
internat/fr/kicad.mo
View file @
ae3c3b6c
No preview for this file type
internat/fr/kicad.po
View file @
ae3c3b6c
This diff is collapsed.
Click to expand it.
pcbnew/librairi.cpp
View file @
ae3c3b6c
...
...
@@ -706,10 +706,10 @@ int WinEDA_BasePcbFrame::Save_1_Module( const wxString& LibName,
MODULE
*
WinEDA_BasePcbFrame
::
Create_1_Module
(
wxDC
*
DC
,
const
wxString
&
module_name
)
/************************************************************************************/
/* Creat
ion d'un module : On place d'office les 2ers texte
s :
*
1er = type REF: nom du module
*
2eme = type VALEUR
: "VAL**"
*
Le module est insere en debut de liste des
modules
/* Creat
e a new module or footprint : A new module is tartted with 2 text
s :
*
First = REFERENCE
*
Second = VALUE
: "VAL**"
*
the new module is added on begining of the linked list of
modules
*/
{
...
...
@@ -717,7 +717,7 @@ MODULE* WinEDA_BasePcbFrame::Create_1_Module( wxDC* DC, const wxString& module_n
wxString
Line
;
wxPoint
newpos
;
/*
Demande du nom du nouveau modul
e */
/*
Ask fo the new module referenc
e */
if
(
module_name
.
IsEmpty
()
)
{
if
(
Get_Message
(
_
(
"Module Reference:"
),
_
(
"Create module"
),
Line
,
this
)
!=
0
)
...
...
@@ -728,6 +728,7 @@ MODULE* WinEDA_BasePcbFrame::Create_1_Module( wxDC* DC, const wxString& module_n
Line
.
Trim
(
TRUE
);
Line
.
Trim
(
FALSE
);
// Creates the new module and add it to te bigenning of the linked list of modules
Module
=
new
MODULE
(
m_Pcb
);
Module
->
Pnext
=
m_Pcb
->
m_Modules
;
...
...
@@ -738,28 +739,26 @@ MODULE* WinEDA_BasePcbFrame::Create_1_Module( wxDC* DC, const wxString& module_n
}
m_Pcb
->
m_Modules
=
Module
;
/* Creation du module : On place d'office les 2 textes ref et val :
* 1er = type REF: nom du module
* 2eme = type VALEUR: "VAL**" */
/* Mise a jour des caract du nouveau module */
/* Update parameters: position, timestamp ... */
newpos
=
GetScreen
()
->
m_Curseur
;
Module
->
SetPosition
(
newpos
);
Module
->
m_LastEdit_Time
=
time
(
NULL
);
/*
Mise a jour du nom de Librairie (reference libr)
*/
/*
Update its name in lib
*/
Module
->
m_LibRef
=
Line
;
/*
Mise a jour de la
reference: */
/*
Update
reference: */
Module
->
m_Reference
->
m_Text
=
Line
;
Module
->
m_Reference
->
SetWidth
(
ModuleTextWidth
);
Module
->
m_Reference
->
m_Size
=
ModuleTextSize
;
/*
mise a jour de la valeurs
*/
/*
Set the value field to a default value
*/
Module
->
m_Value
->
m_Text
=
wxT
(
"VAL**"
);
Module
->
m_Value
->
SetWidth
(
ModuleTextWidth
);
Module
->
m_Value
->
m_Size
=
ModuleTextSize
;
Module
->
SetPosition
(
wxPoint
(
0
,
0
)
);
Module
->
Display_Infos
(
this
);
return
Module
;
}
...
...
pcbnew/modedit.cpp
View file @
ae3c3b6c
...
...
@@ -215,12 +215,13 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
GetScreen
()
->
m_Curseur
=
wxPoint
(
0
,
0
);
MODULE
*
module
=
Create_1_Module
(
&
dc
,
wxEmptyString
);
wxASSERT
(
module
);
module
->
SetPosition
(
wxPoint
(
0
,
0
)
);
if
(
m_Pcb
->
m_Modules
)
m_Pcb
->
m_Modules
->
m_Flags
=
0
;
Zoom_Automatique
(
TRUE
);
if
(
module
)
// i.e. if create module command not aborted
{
module
->
SetPosition
(
wxPoint
(
0
,
0
)
);
if
(
m_Pcb
->
m_Modules
)
m_Pcb
->
m_Modules
->
m_Flags
=
0
;
Zoom_Automatique
(
TRUE
);
}
}
break
;
...
...
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