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
958e663d
Commit
958e663d
authored
Aug 19, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcbnew: bugs 2840153, 2840154 fixed (bug 2840150 already fixed)
parent
4117870f
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
256 additions
and
231 deletions
+256
-231
kicad.mo
internat/fr/kicad.mo
+0
-0
kicad.po
internat/fr/kicad.po
+236
-202
dialog_edit_module_text.cpp
pcbnew/dialog_edit_module_text.cpp
+10
-10
dialog_edit_module_text_base.cpp
pcbnew/dialog_edit_module_text_base.cpp
+0
-2
dialog_edit_module_text_base.fbp
pcbnew/dialog_edit_module_text_base.fbp
+1
-1
dialog_edit_module_text_base.h
pcbnew/dialog_edit_module_text_base.h
+0
-1
netlist.cpp
pcbnew/netlist.cpp
+9
-15
No files found.
internat/fr/kicad.mo
View file @
958e663d
No preview for this file type
internat/fr/kicad.po
View file @
958e663d
This diff is collapsed.
Click to expand it.
pcbnew/dialog_edit_module_text.cpp
View file @
958e663d
...
...
@@ -33,7 +33,7 @@ public:
~
DialogEditModuleText
()
{};
private
:
void
OnInitDialog
(
wxInitDialogEvent
&
event
);
void
Init
(
);
void
OnOkClick
(
wxCommandEvent
&
event
);
void
OnCancelClick
(
wxCommandEvent
&
event
);
};
...
...
@@ -58,20 +58,22 @@ DialogEditModuleText::DialogEditModuleText( WinEDA_BasePcbFrame* parent, TEXTE_
m_Module
=
NULL
;
m_CurrentTextMod
=
TextMod
;
if
(
m_CurrentTextMod
)
{
m_Module
=
(
MODULE
*
)
m_CurrentTextMod
->
GetParent
();
}
Init
(
);
GetSizer
()
->
Fit
(
this
);
GetSizer
()
->
SetSizeHints
(
this
);
}
void
DialogEditModuleText
::
OnCancelClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
(
);
EndModal
(
0
);
}
/********************************************************/
void
DialogEditModuleText
::
OnInitDialog
(
wxInitDialogEvent
&
event
)
void
DialogEditModuleText
::
Init
(
)
/********************************************************/
{
SetFocus
();
...
...
@@ -84,7 +86,7 @@ void DialogEditModuleText::OnInitDialog( wxInitDialogEvent& event )
msg
.
Printf
(
format
,
m_Module
->
m_Reference
->
m_Text
.
GetData
(),
m_Module
->
m_Value
->
m_Text
.
GetData
(),
(
float
)
(
m_Module
->
m_Orient
/
10
)
);
(
float
)
m_Module
->
m_Orient
/
10
);
}
else
...
...
@@ -132,8 +134,6 @@ void DialogEditModuleText::OnInitDialog( wxInitDialogEvent& event )
if
(
m_CurrentTextMod
->
m_NoShow
)
m_Show
->
SetSelection
(
1
);;
GetSizer
()
->
Fit
(
this
);
GetSizer
()
->
SetSizeHints
(
this
);
}
...
...
@@ -184,7 +184,7 @@ void DialogEditModuleText::OnOkClick( wxCommandEvent& event )
int
maxthickness
=
Clamp_Text_PenSize
(
width
,
m_CurrentTextMod
->
m_Size
);
if
(
width
>
maxthickness
)
{
DisplayError
(
this
,
_
(
"The text thickness is too large for the text size. It will be clamped"
));
DisplayError
(
NULL
,
_
(
"The text thickness is too large for the text size. It will be clamped"
));
width
=
maxthickness
;
}
m_CurrentTextMod
->
SetWidth
(
width
);
...
...
@@ -203,5 +203,5 @@ void DialogEditModuleText::OnOkClick( wxCommandEvent& event )
if
(
m_Module
)
m_Module
->
m_LastEdit_Time
=
time
(
NULL
);
Close
(
TRUE
);
EndModal
(
1
);
}
pcbnew/dialog_edit_module_text_base.cpp
View file @
958e663d
...
...
@@ -117,7 +117,6 @@ DialogEditModuleText_base::DialogEditModuleText_base( wxWindow* parent, wxWindow
this
->
Layout
();
// Connect Events
this
->
Connect
(
wxEVT_INIT_DIALOG
,
wxInitDialogEventHandler
(
DialogEditModuleText_base
::
OnInitDialog
)
);
m_buttonOK
->
Connect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DialogEditModuleText_base
::
OnOkClick
),
NULL
,
this
);
m_buttonCANCEL
->
Connect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DialogEditModuleText_base
::
OnCancelClick
),
NULL
,
this
);
}
...
...
@@ -125,7 +124,6 @@ DialogEditModuleText_base::DialogEditModuleText_base( wxWindow* parent, wxWindow
DialogEditModuleText_base
::~
DialogEditModuleText_base
()
{
// Disconnect Events
this
->
Disconnect
(
wxEVT_INIT_DIALOG
,
wxInitDialogEventHandler
(
DialogEditModuleText_base
::
OnInitDialog
)
);
m_buttonOK
->
Disconnect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DialogEditModuleText_base
::
OnOkClick
),
NULL
,
this
);
m_buttonCANCEL
->
Disconnect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DialogEditModuleText_base
::
OnCancelClick
),
NULL
,
this
);
}
pcbnew/dialog_edit_module_text_base.fbp
View file @
958e663d
...
...
@@ -49,7 +49,7 @@
<event
name=
"OnHibernate"
></event>
<event
name=
"OnIconize"
></event>
<event
name=
"OnIdle"
></event>
<event
name=
"OnInitDialog"
>
OnInitDialog
</event>
<event
name=
"OnInitDialog"
></event>
<event
name=
"OnKeyDown"
></event>
<event
name=
"OnKeyUp"
></event>
<event
name=
"OnKillFocus"
></event>
...
...
pcbnew/dialog_edit_module_text_base.h
View file @
958e663d
...
...
@@ -55,7 +55,6 @@ class DialogEditModuleText_base : public wxDialog
wxButton
*
m_buttonCANCEL
;
// Virtual event handlers, overide them in your derived class
virtual
void
OnInitDialog
(
wxInitDialogEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnOkClick
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnCancelClick
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
...
...
pcbnew/netlist.cpp
View file @
958e663d
...
...
@@ -90,7 +90,7 @@ static MODULE* ReadNetModule( WinEDA_PcbFrame* aFrame,
int
TstOnly
,
bool
Select_By_Timestamp
,
bool
aChangeFootprint
);
static
void
LoadListeModules
(
WinEDA_PcbFrame
*
aPcbFrame
,
wxDC
*
DC
);
static
void
LoadListeModules
(
WinEDA_PcbFrame
*
aPcbFrame
);
/* Variables locales */
...
...
@@ -230,7 +230,7 @@ void ReadPcbNetlist( WinEDA_PcbFrame* aFrame,
/* Load new footprints */
if
(
s_NbNewModules
)
{
LoadListeModules
(
aFrame
,
NULL
);
LoadListeModules
(
aFrame
);
// Free module list:
MODULEtoLOAD
*
item
,
*
next_item
;
...
...
@@ -340,7 +340,7 @@ void ReadPcbNetlist( WinEDA_PcbFrame* aFrame,
if
(
!
IsOK
(
NULL
,
_
(
"Ok to delete footprints not in netlist ?"
)
)
)
break
;
}
aFrame
->
Delete_Module
(
Module
,
NULL
,
false
);
Module
->
DeleteStructure
(
);
}
}
}
...
...
@@ -961,7 +961,7 @@ void AddToList( const wxString& NameLibCmp, const wxString& CmpName, const wxStr
/***************************************************************/
void
LoadListeModules
(
WinEDA_PcbFrame
*
aPcbFrame
,
wxDC
*
DC
)
void
LoadListeModules
(
WinEDA_PcbFrame
*
aPcbFrame
)
/***************************************************************/
/* Routine de chargement des nouveaux modules en une seule lecture des
...
...
@@ -973,7 +973,7 @@ void LoadListeModules( WinEDA_PcbFrame* aPcbFrame, wxDC* DC )
MODULEtoLOAD
*
ref
,
*
cmp
;
int
ii
;
MODULE
*
Module
=
NULL
;
wxPoint
OldPos
=
aPcbFrame
->
GetScreen
()
->
m_Curseur
;
wxPoint
ModuleBestPosition
;
if
(
s_NbNewModules
==
0
)
return
;
...
...
@@ -984,15 +984,11 @@ void LoadListeModules( WinEDA_PcbFrame* aPcbFrame, wxDC* DC )
// Calculate the footprint "best" position:
if
(
aPcbFrame
->
SetBoardBoundaryBoxFromEdgesOnly
()
)
{
aPcbFrame
->
GetScreen
()
->
m_Curseur
.
x
=
aPcbFrame
->
GetBoard
()
->
m_BoundaryBox
.
GetRight
()
+
5000
;
aPcbFrame
->
GetScreen
()
->
m_Curseur
.
y
=
aPcbFrame
->
GetBoard
()
->
m_BoundaryBox
.
GetBottom
()
+
10000
;
ModuleBestPosition
.
x
=
aPcbFrame
->
GetBoard
()
->
m_BoundaryBox
.
GetRight
()
+
5000
;
ModuleBestPosition
.
y
=
aPcbFrame
->
GetBoard
()
->
m_BoundaryBox
.
GetBottom
()
+
10000
;
}
else
{
aPcbFrame
->
GetScreen
()
->
m_Curseur
=
wxPoint
(
0
,
0
);
}
ModuleBestPosition
=
wxPoint
(
0
,
0
);
for
(
ii
=
0
;
ii
<
s_NbNewModules
;
ii
++
,
cmp
=
cmp
->
Next
()
)
{
...
...
@@ -1009,7 +1005,7 @@ void LoadListeModules( WinEDA_PcbFrame* aPcbFrame, wxDC* DC )
DisplayError
(
NULL
,
msg
);
continue
;
}
aPcbFrame
->
Place_Module
(
Module
,
DC
);
Module
->
SetPosition
(
ModuleBestPosition
);
/* Update schematic links : reference "Time Stamp" and schematic hierarchical path */
Module
->
m_Reference
->
m_Text
=
cmp
->
m_CmpName
;
...
...
@@ -1034,8 +1030,6 @@ void LoadListeModules( WinEDA_PcbFrame* aPcbFrame, wxDC* DC )
Module
->
m_Path
=
cmp
->
m_TimeStampPath
;
}
}
aPcbFrame
->
GetScreen
()
->
m_Curseur
=
OldPos
;
}
...
...
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