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
72357970
Commit
72357970
authored
Mar 22, 2008
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Netlist dialog redesigned, netlist.cpp code modified
parent
154be142
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
1274 additions
and
602 deletions
+1274
-602
change_log.txt
change_log.txt
+8
-0
onrightclick.cpp
eeschema/onrightclick.cpp
+3
-1
wxPcbStruct.h
include/wxPcbStruct.h
+1
-1
dialog_netlist.cpp
pcbnew/dialog_netlist.cpp
+150
-54
dialog_netlist.h
pcbnew/dialog_netlist.h
+32
-32
dialog_netlist.pjd
pcbnew/dialog_netlist.pjd
+521
-212
edit.cpp
pcbnew/edit.cpp
+2
-2
modules.cpp
pcbnew/modules.cpp
+16
-12
netlist.cpp
pcbnew/netlist.cpp
+271
-199
pcbnew.h
pcbnew/pcbnew.h
+1
-2
ratsnest.cpp
pcbnew/ratsnest.cpp
+27
-22
xchgmod.cpp
pcbnew/xchgmod.cpp
+3
-9
dialog_print.cpp
share/dialog_print.cpp
+32
-33
dialog_print.h
share/dialog_print.h
+3
-2
dialog_print.pjd
share/dialog_print.pjd
+204
-21
No files found.
change_log.txt
View file @
72357970
...
...
@@ -5,6 +5,14 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.
2008-Mar-21 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+pcbnew
Netlist dialog redesigned, netlist.cpp code modified
and added an option to remove not locked footprints
when not found in netlist
2008-Mar-21 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
+pcbnew
...
...
eeschema/onrightclick.cpp
View file @
72357970
...
...
@@ -298,7 +298,9 @@ void AddMenusForComponent( wxMenu* PopMenu, SCH_COMPONENT* Component )
if
(
!
Component
->
m_Flags
)
{
msg
=
AddHotkeyName
(
_
(
"Move Component"
),
s_Schematic_Hokeys_Descr
,
HK_MOVE_COMPONENT
);
msg
=
_
(
"Move Component"
);
msg
<<
wxT
(
" "
)
<<
Component
->
GetFieldValue
(
REFERENCE
);
msg
=
AddHotkeyName
(
msg
,
s_Schematic_Hokeys_Descr
,
HK_MOVE_COMPONENT
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_MOVE_CMP_REQUEST
,
msg
,
move_xpm
);
msg
=
AddHotkeyName
(
_
(
"Drag Component"
),
s_Schematic_Hokeys_Descr
,
HK_DRAG_COMPONENT
);
...
...
include/wxPcbStruct.h
View file @
72357970
...
...
@@ -441,7 +441,7 @@ public:
// Footprint edition (see also WinEDA_BasePcbFrame)
void
StartMove_Module
(
MODULE
*
module
,
wxDC
*
DC
);
bool
Delete_Module
(
MODULE
*
module
,
wxDC
*
DC
);
bool
Delete_Module
(
MODULE
*
module
,
wxDC
*
DC
,
bool
aAskBeforeDeleting
);
// loading modules: see WinEDA_BasePcbFrame
...
...
pcbnew/dialog_netlist.cpp
View file @
72357970
This diff is collapsed.
Click to expand it.
pcbnew/dialog_netlist.h
View file @
72357970
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_netlist.h
// Purpose:
// Purpose:
// Author: jean-pierre Charras
// Modified by:
// Modified by:
// Created: 26/02/2006 17:42:19
// RCS-ID:
// RCS-ID:
// Copyright: License GNU
// Licence:
// Licence:
/////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 26/02/2006 17:42:19
...
...
@@ -14,7 +15,6 @@
#ifndef _DIALOG_NETLIST_H_
#define _DIALOG_NETLIST_H_
/*!
* Includes
*/
...
...
@@ -38,18 +38,20 @@ class wxStdDialogButtonSizer;
////@begin control identifiers
#define ID_DIALOG 10000
#define ID_RADIOBOX 10005
#define ID_RADIOBOX1 10006
#define ID_RADIOBOX2 10007
#define ID_CHECKBOX 10008
#define ID_SELECTION_FOOTPRINT_MODE 10005
#define ID_KEEP_OR_CHANGE_FOOTPRINTS 10007
#define ID_DELETE_TRACKS_OPTION 10006
#define ID_DISPLAY_WARNINGS_OPT 10008
#define ID_REMOVE_EXTRA_FOOTPRINTS_OPT 10011
#define ID_OPEN_NELIST 10001
#define ID_READ_NETLIST_FILE 10002
#define ID_TEST_NETLIST 10003
#define ID_COMPILE_RATSNEST 10004
#define ID_TEXT_NETLIST_FILENAME 10012
#define ID_TEXTCTRL 10009
#define ID_STATICLINE 10010
#define SYMBOL_WINEDA_NETLISTFRAME_STYLE wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER
#define SYMBOL_WINEDA_NETLISTFRAME_TITLE _("Netlist
:
")
#define SYMBOL_WINEDA_NETLISTFRAME_TITLE _("Netlist
Dialog
")
#define SYMBOL_WINEDA_NETLISTFRAME_IDNAME ID_DIALOG
#define SYMBOL_WINEDA_NETLISTFRAME_SIZE wxSize(400, 300)
#define SYMBOL_WINEDA_NETLISTFRAME_POSITION wxDefaultPosition
...
...
@@ -63,24 +65,33 @@ class wxStdDialogButtonSizer;
#define wxCLOSE_BOX 0x1000
#endif
/*!
* WinEDA_NetlistFrame class declaration
*/
class
WinEDA_NetlistFrame
:
public
wxDialog
{
{
DECLARE_DYNAMIC_CLASS
(
WinEDA_NetlistFrame
)
DECLARE_EVENT_TABLE
()
public
:
/// Constructors
WinEDA_NetlistFrame
(
);
WinEDA_NetlistFrame
(
WinEDA_PcbFrame
*
parent
,
wxDC
*
DC
,
wxWindowID
id
=
SYMBOL_WINEDA_NETLISTFRAME_IDNAME
,
const
wxString
&
caption
=
SYMBOL_WINEDA_NETLISTFRAME_TITLE
,
const
wxPoint
&
pos
=
SYMBOL_WINEDA_NETLISTFRAME_POSITION
,
const
wxSize
&
size
=
SYMBOL_WINEDA_NETLISTFRAME_SIZE
,
long
style
=
SYMBOL_WINEDA_NETLISTFRAME_STYLE
);
WinEDA_NetlistFrame
();
WinEDA_NetlistFrame
(
WinEDA_PcbFrame
*
parent
,
wxDC
*
DC
,
const
wxString
&
aNetlistFilename
,
wxWindowID
id
=
SYMBOL_WINEDA_NETLISTFRAME_IDNAME
,
const
wxString
&
caption
=
SYMBOL_WINEDA_NETLISTFRAME_TITLE
,
const
wxPoint
&
pos
=
SYMBOL_WINEDA_NETLISTFRAME_POSITION
,
const
wxSize
&
size
=
SYMBOL_WINEDA_NETLISTFRAME_SIZE
,
long
style
=
SYMBOL_WINEDA_NETLISTFRAME_STYLE
);
/// Creation
bool
Create
(
wxWindow
*
parent
,
wxWindowID
id
=
SYMBOL_WINEDA_NETLISTFRAME_IDNAME
,
const
wxString
&
caption
=
SYMBOL_WINEDA_NETLISTFRAME_TITLE
,
const
wxPoint
&
pos
=
SYMBOL_WINEDA_NETLISTFRAME_POSITION
,
const
wxSize
&
size
=
SYMBOL_WINEDA_NETLISTFRAME_SIZE
,
long
style
=
SYMBOL_WINEDA_NETLISTFRAME_STYLE
);
/// Destructor
~
WinEDA_NetlistFrame
();
/// Initialises member variables
void
Init
();
/// Creates the controls and sizers
void
CreateControls
();
...
...
@@ -115,31 +126,20 @@ public:
/// Should we show tooltips?
static
bool
ShowToolTips
();
void
ReadPcbNetlist
(
wxCommandEvent
&
event
);
void
Set_NetlisteName
(
wxCommandEvent
&
event
);
bool
OpenNetlistFile
(
wxCommandEvent
&
event
);
int
BuildListeNetModules
(
wxCommandEvent
&
event
,
wxArrayString
&
BufName
);
void
ModulesControle
(
wxCommandEvent
&
event
);
int
ReadListeModules
(
const
wxString
*
RefCmp
,
long
TimeStamp
,
wxString
&
NameModule
);
int
SetPadNetName
(
char
*
Line
,
MODULE
*
Module
);
MODULE
*
ReadNetModule
(
char
*
Text
,
int
*
UseFichCmp
,
int
TstOnly
);
void
AddToList
(
const
wxString
&
NameLibCmp
,
const
wxString
&
NameCmp
,
int
TimeStamp
,
const
wxString
&
path
);
void
LoadListeModules
(
wxDC
*
DC
);
////@begin WinEDA_NetlistFrame member variables
wxRadioBox
*
m_Select_By_Timestamp
;
wxRadioBox
*
m_ChangeExistingFootprintCtrl
;
wxRadioBox
*
m_DeleteBadTracks
;
wxRadioBox
*
m_ChangeExistantModuleCtrl
;
wxCheckBox
*
m_DisplayWarningCtrl
;
wxCheckBox
*
m_RemoveExtraFootprintsCtrl
;
wxTextCtrl
*
m_NetlistFilenameCtrl
;
wxTextCtrl
*
m_MessageWindow
;
wxStdDialogButtonSizer
*
StdDialogButtonSizer
;
////@end WinEDA_NetlistFrame member variables
WinEDA_PcbFrame
*
m_Parent
;
wxDC
*
m_DC
;
WinEDA_PcbFrame
*
m_Parent
;
wxDC
*
m_DC
;
};
#endif
// _DIALOG_NETLIST_H_
// _DIALOG_NETLIST_H_
pcbnew/dialog_netlist.pjd
View file @
72357970
This diff is collapsed.
Click to expand it.
pcbnew/edit.cpp
View file @
72357970
...
...
@@ -592,7 +592,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
if
(
!
GetCurItem
()
||
GetCurItem
()
->
Type
()
!=
TYPEMODULE
)
break
;
if
(
Delete_Module
(
(
MODULE
*
)
GetCurItem
(),
&
dc
)
)
if
(
Delete_Module
(
(
MODULE
*
)
GetCurItem
(),
&
dc
,
true
)
)
{
SetCurItem
(
NULL
);
}
...
...
@@ -1023,7 +1023,7 @@ void WinEDA_PcbFrame::RemoveStruct( BOARD_ITEM* Item, wxDC* DC )
switch
(
Item
->
Type
()
)
{
case
TYPEMODULE
:
Delete_Module
(
(
MODULE
*
)
Item
,
DC
);
Delete_Module
(
(
MODULE
*
)
Item
,
DC
,
true
);
break
;
case
TYPECOTATION
:
...
...
pcbnew/modules.cpp
View file @
72357970
...
...
@@ -263,9 +263,9 @@ void Montre_Position_Empreinte( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
}
/**************************************************************/
bool
WinEDA_PcbFrame
::
Delete_Module
(
MODULE
*
module
,
wxDC
*
DC
)
/**************************************************************/
/**************************************************************
***************************
/
bool
WinEDA_PcbFrame
::
Delete_Module
(
MODULE
*
module
,
wxDC
*
DC
,
bool
aAskBeforeDeleting
)
/**************************************************************
****************************
/
/**
* Function Delete Module
...
...
@@ -273,6 +273,7 @@ bool WinEDA_PcbFrame::Delete_Module( MODULE* module, wxDC* DC )
* The net rastenes and pad list are recalcualed
* @param module = footprint to delete
* @param DC = currentDevice Context. if NULL: do not redraw new ratsnets and dirty rectange
* @param aPromptBeforeDeleting : if true: ask for confirmation before deleting
*/
{
EDA_BaseStruct
*
PtBack
,
*
PtNext
;
...
...
@@ -285,12 +286,15 @@ bool WinEDA_PcbFrame::Delete_Module( MODULE* module, wxDC* DC )
/* Confirmation de l'effacement */
module
->
Display_Infos
(
this
);
msg
<<
_
(
"Delete Module"
)
<<
wxT
(
" "
)
<<
module
->
m_Reference
->
m_Text
<<
wxT
(
" ("
)
<<
_
(
"Value "
)
<<
module
->
m_Value
->
m_Text
<<
wxT
(
") ?"
);
if
(
!
IsOK
(
this
,
msg
)
)
if
(
aAskBeforeDeleting
)
{
return
FALSE
;
msg
<<
_
(
"Delete Module"
)
<<
wxT
(
" "
)
<<
module
->
m_Reference
->
m_Text
<<
wxT
(
" ("
)
<<
_
(
"Value "
)
<<
module
->
m_Value
->
m_Text
<<
wxT
(
") ?"
);
if
(
!
IsOK
(
this
,
msg
)
)
{
return
FALSE
;
}
}
m_CurrentScreen
->
SetModify
();
...
...
@@ -332,7 +336,7 @@ bool WinEDA_PcbFrame::Delete_Module( MODULE* module, wxDC* DC )
void
BOARD
::
Change_Side_Module
(
MODULE
*
Module
,
wxDC
*
DC
)
/****************************************************************************/
/**
/**
* Function Change_Side_Module
* Filp a footprint (switch layer from component or component to copper)
* The mirroring is made from X axis
...
...
@@ -483,7 +487,7 @@ void BOARD::Change_Side_Module( MODULE* Module, wxDC* DC )
pt_texte
->
m_Miroir
=
1
;
NEGATE_AND_NORMALIZE_ANGLE_POS
(
pt_texte
->
m_Orient
);
pt_texte
->
SetLayer
(
Module
->
GetLayer
()
);
pt_texte
->
SetLayer
(
Module
->
GetLayer
()
);
pt_texte
->
SetLayer
(
ChangeSideNumLayer
(
pt_texte
->
GetLayer
()
)
);
if
(
Module
->
GetLayer
()
==
COPPER_LAYER_N
)
...
...
@@ -517,7 +521,7 @@ void BOARD::Change_Side_Module( MODULE* Module, wxDC* DC )
if
(
DC
&&
m_PcbFrame
)
{
Module
->
Draw
(
m_PcbFrame
->
DrawPanel
,
DC
,
wxPoint
(
0
,
0
),
GR_OR
);
/* affichage chevelu general si necessaire */
m_PcbFrame
->
ReCompile_Ratsnest_After_Changes
(
DC
);
}
...
...
@@ -753,7 +757,7 @@ void WinEDA_BasePcbFrame::Rotate_Module( wxDC* DC, MODULE* module,
if
(
!
(
module
->
m_Flags
&
IS_MOVED
)
)
/* Rotation simple */
{
module
->
Draw
(
DrawPanel
,
DC
,
wxPoint
(
0
,
0
),
GR_OR
);
/* Reaffichage chevelu general si necessaire */
ReCompile_Ratsnest_After_Changes
(
DC
);
}
...
...
pcbnew/netlist.cpp
View file @
72357970
This diff is collapsed.
Click to expand it.
pcbnew/pcbnew.h
View file @
72357970
...
...
@@ -169,8 +169,7 @@ eda_global wxString g_SaveFileName // File Name for periodic saving
(
wxT
(
"$savepcb"
)
)
#endif
;
eda_global
wxString
NetNameBuffer
;
// Netlist file extension
eda_global
wxString
NetExtBuffer
eda_global
wxString
NetExtBuffer
// Netlist file extension
#ifdef MAIN
(
wxT
(
".net"
)
)
#endif
...
...
pcbnew/ratsnest.cpp
View file @
72357970
...
...
@@ -247,7 +247,7 @@ static int gen_rats_block_to_block( WinEDA_DrawPanel* DrawPanel, wxDC* DC,
// we memorise the "best" current values for merging
current_num_block
=
curr_pad
->
m_logical_connexion
;
dist_min
=
current_dist
;
pt_liste_pad_tmp
=
pt_liste_pad_aux
;
pt_liste_pad_block1
=
pt_liste_pad
;
}
...
...
@@ -389,7 +389,7 @@ static int gen_rats_pad_to_pad( WinEDA_DrawPanel* DrawPanel, wxDC* DC,
g_pt_chevelu
->
pad_start
=
ref_pad
;
g_pt_chevelu
->
pad_end
=
pad
;
if
(
DisplayRastnestInProgress
)
if
(
DisplayRastnestInProgress
&&
DC
)
{
GRLine
(
&
DrawPanel
->
m_ClipBox
,
DC
,
g_pt_chevelu
->
pad_start
->
m_Pos
.
x
,
g_pt_chevelu
->
pad_start
->
m_Pos
.
y
,
...
...
@@ -483,10 +483,10 @@ void WinEDA_BasePcbFrame::Build_Board_Ratsnest( wxDC* DC )
DisplayRastnestInProgress
=
TRUE
;
g_pt_chevelu
=
m_Pcb
->
m_Ratsnest
;
pt_liste_pad
=
pt_start_liste
=
m_Pcb
->
m_Pads
;
pt_liste_pad_limite
=
pt_start_liste
+
m_Pcb
->
m_NbPads
;
current_net_code
=
1
;
// 1er net_code a analyser (net_code = 0 -> no connect)
equipot
=
m_Pcb
->
m_Equipots
;
noconn
=
0
;
...
...
@@ -494,14 +494,14 @@ void WinEDA_BasePcbFrame::Build_Board_Ratsnest( wxDC* DC )
{
pt_deb_liste_ch
=
g_pt_chevelu
;
pad
=
*
pt_liste_pad
;
/* Skip the not connected pads */
if
(
pad
->
GetNet
()
==
0
)
{
pt_liste_pad
++
;
pt_start_liste
=
pt_liste_pad
;
continue
;
}
/* Search the end of pad list des pads for the current net */
num_block
=
pad
->
m_logical_connexion
;
nbpads
=
0
;
...
...
@@ -509,11 +509,11 @@ void WinEDA_BasePcbFrame::Build_Board_Ratsnest( wxDC* DC )
{
if
(
pt_end_liste
>=
pt_liste_pad_limite
)
break
;
pad
=
*
pt_end_liste
;
if
(
pad
->
GetNet
()
!=
current_net_code
)
break
;
nbpads
++
;
if
(
num_block
<
pad
->
m_logical_connexion
)
num_block
=
pad
->
m_logical_connexion
;
...
...
@@ -566,8 +566,8 @@ void WinEDA_BasePcbFrame::Build_Board_Ratsnest( wxDC* DC )
// erase the ratsnest displayed on screen if needed
CHEVELU
*
Chevelu
=
(
CHEVELU
*
)
m_Pcb
->
m_Ratsnest
;
GRSetDrawMode
(
DC
,
GR_XOR
);
if
(
DC
)
GRSetDrawMode
(
DC
,
GR_XOR
);
for
(
ii
=
m_Pcb
->
GetNumRatsnests
();
ii
>
0
;
ii
--
,
Chevelu
++
)
{
if
(
!
g_Show_Ratsnest
)
...
...
@@ -733,7 +733,7 @@ static int tst_rats_pad_to_pad( WinEDA_DrawPanel* DrawPanel, wxDC* DC,
for
(
chevelu
=
start_rat_list
;
chevelu
<
end_rat_list
;
chevelu
++
)
{
pad_start
=
chevelu
->
pad_start
;
pad_start
=
chevelu
->
pad_start
;
pad_end
=
chevelu
->
pad_end
;
/* Update the block if the 2 pads are not connected : a new block is created
...
...
@@ -878,7 +878,7 @@ void WinEDA_BasePcbFrame::recalcule_pad_net_code()
{
if
(
(
*
pad_courant
)
->
m_Netname
.
IsEmpty
()
)
// pad not connected
{
(
*
pad_courant
)
->
SetNet
(
0
);
(
*
pad_courant
)
->
SetNet
(
0
);
continue
;
}
...
...
@@ -965,7 +965,7 @@ void WinEDA_BasePcbFrame::recalcule_pad_net_code()
MyFree
(
BufPtEquipot
);
m_Pcb
->
m_Status_Pcb
|=
NET_CODES_OK
;
m_Pcb
->
SetAreasNetCodesFromNetNames
();
}
...
...
@@ -1089,7 +1089,7 @@ char* WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module )
build_liste_pads
();
/* Compute the "local" ratsnest if needed (when this footprint starts move)
and the list of external pads to consider, i.e pads in others footprints which are "connected" to
and the list of external pads to consider, i.e pads in others footprints which are "connected" to
a pad in the current footprint
*/
if
(
(
m_Pcb
->
m_Status_Pcb
&
CHEVELU_LOCAL_OK
)
!=
0
)
...
...
@@ -1127,7 +1127,7 @@ char* WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module )
pad_ref
=
pt_liste_ref
[
ii
];
if
(
pad_ref
->
GetNet
()
==
current_net_code
)
continue
;
current_net_code
=
pad_ref
->
GetNet
();
pt_liste_generale
=
m_Pcb
->
m_Pads
;
...
...
@@ -1142,10 +1142,10 @@ char* WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module )
pad_externe
->
m_logical_connexion
=
0
;
pad_externe
->
m_physical_connexion
=
0
;
*
pt_liste_pad
=
pad_externe
;
*
pt_liste_pad
=
pad_externe
;
pt_liste_pad
++
;
nb_pads_externes
++
;
}
}
...
...
@@ -1164,9 +1164,9 @@ char* WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module )
g_pt_chevelu
=
local_liste_chevelu
;
pt_liste_pad
=
pt_start_liste
=
(
LISTE_PAD
*
)
adr_lowmem
;
pt_liste_pad_limite
=
pt_liste_pad
+
nb_pads_ref
;
current_net_code
=
(
*
pt_liste_pad
)
->
GetNet
();
for
(
;
pt_liste_pad
<
pt_liste_pad_limite
;
)
...
...
@@ -1270,7 +1270,7 @@ calcul_chevelu_ext:
local_chevelu
->
SetNet
(
pad_ref
->
GetNet
()
);
local_chevelu
->
dist
=
distance
;
local_chevelu
->
status
=
0
;
increment
=
1
;
}
}
...
...
@@ -1302,6 +1302,8 @@ void WinEDA_BasePcbFrame::trace_ratsnest_module( wxDC* DC )
CHEVELU
*
local_chevelu
;
int
ii
;
if
(
DC
==
NULL
)
return
;
if
(
(
m_Pcb
->
m_Status_Pcb
&
CHEVELU_LOCAL_OK
)
==
0
)
return
;
...
...
@@ -1457,7 +1459,7 @@ int* WinEDA_BasePcbFrame::build_ratsnest_pad( EDA_BaseStruct* ref,
else
if
(
nb_local_chevelu
)
{
*
pt_coord
=
refpos
.
x
;
*
pt_coord
=
refpos
.
x
;
*
(
pt_coord
+
1
)
=
refpos
.
y
;
}
...
...
@@ -1479,6 +1481,9 @@ void WinEDA_BasePcbFrame::trace_ratsnest_pad( wxDC* DC )
int
ii
;
int
refX
,
refY
;
if
(
DC
==
NULL
)
return
;
if
(
(
m_Pcb
->
m_Status_Pcb
&
LISTE_CHEVELU_OK
)
==
0
)
return
;
...
...
pcbnew/xchgmod.cpp
View file @
72357970
...
...
@@ -196,7 +196,7 @@ int WinEDA_ExchangeModuleFrame::Maj_ListeCmp(
/*
* Met a jour le fichier name.CMP (s'il existe) apres un echange de module
* (par la commande changeMod), si les modules sont geres par ce fichier
*
*
* Si ShowError != 0 affiche message d'erreur si le fichier .cmp n'est pas
* trouve.
* Retoure 1 si erreur
...
...
@@ -211,10 +211,7 @@ int WinEDA_ExchangeModuleFrame::Maj_ListeCmp(
return
0
;
/* pas de changement de nom */
/* Calcul nom fichier CMP par changement de l'extension du nom netliste */
if
(
NetNameBuffer
==
wxEmptyString
)
FileNameCmp
=
m_Parent
->
m_CurrentScreen
->
m_FileName
;
else
FileNameCmp
=
NetNameBuffer
;
FileNameCmp
=
m_Parent
->
m_CurrentScreen
->
m_FileName
;
ChangeFileNameExt
(
FileNameCmp
,
NetCmpExtBuffer
);
// Modification du fichier .cmp correcpondant
...
...
@@ -617,10 +614,7 @@ bool WinEDA_PcbFrame::RecreateCmpFileFromBoard()
}
/* Calcul nom fichier CMP par changement de l'extension du nom netliste */
if
(
NetNameBuffer
==
wxEmptyString
)
FullFileNameCmp
=
m_CurrentScreen
->
m_FileName
;
else
FullFileNameCmp
=
NetNameBuffer
;
FullFileNameCmp
=
m_CurrentScreen
->
m_FileName
;
ChangeFileNameExt
(
FullFileNameCmp
,
NetCmpExtBuffer
);
mask
=
wxT
(
"*"
)
+
NetCmpExtBuffer
;
...
...
share/dialog_print.cpp
View file @
72357970
...
...
@@ -42,7 +42,7 @@ BEGIN_EVENT_TABLE( WinEDA_PrintFrame, wxDialog )
EVT_BUTTON
(
ID_PRINT_EXECUTE
,
WinEDA_PrintFrame
::
OnPrintExecuteClick
)
EVT_BUTTON
(
wxID_C
LOSE
,
WinEDA_PrintFrame
::
OnClose
Click
)
EVT_BUTTON
(
wxID_C
ANCEL
,
WinEDA_PrintFrame
::
OnCancel
Click
)
////@end WinEDA_PrintFrame event table entries
...
...
@@ -91,10 +91,11 @@ bool WinEDA_PrintFrame::Create( wxWindow* parent, wxWindowID id, const wxString&
m_ColorOption
=
NULL
;
m_PagesOptionPcb
=
NULL
;
m_PagesOptionEeschema
=
NULL
;
m_CloseButton
=
NULL
;
////@end WinEDA_PrintFrame member initialisation
////@begin WinEDA_PrintFrame creation
SetExtraStyle
(
GetExtraStyle
()
|
wxWS_EX_BLOCK_EVENTS
);
SetExtraStyle
(
wxWS_EX_BLOCK_EVENTS
);
wxDialog
::
Create
(
parent
,
id
,
caption
,
pos
,
size
,
style
);
CreateControls
();
...
...
@@ -116,7 +117,7 @@ void WinEDA_PrintFrame::CreateControls()
SetFont
(
*
g_DialogFont
);
////@begin WinEDA_PrintFrame content construction
// Generated by DialogBlocks, 2
4/01/2007 16:36:31
(unregistered)
// Generated by DialogBlocks, 2
2/03/2008 08:33:38
(unregistered)
WinEDA_PrintFrame
*
itemDialog1
=
this
;
...
...
@@ -132,18 +133,17 @@ void WinEDA_PrintFrame::CreateControls()
wxBoxSizer
*
itemBoxSizer5
=
new
wxBoxSizer
(
wxVERTICAL
);
itemBoxSizer2
->
Add
(
itemBoxSizer5
,
0
,
wxGROW
|
wxALL
,
5
);
wxString
m_ScaleOptionStrings
[]
=
{
_
(
"fit in page"
),
_
(
"Scale 0.5"
),
_
(
"Scale 0.7"
),
_
(
"Approx. Scale 1"
),
_
(
"Accurate Scale 1"
),
_
(
"Scale 1.4"
),
_
(
"Scale 2"
),
_
(
"Scale 3"
),
_
(
"Scale 4"
)
};
m_ScaleOption
=
new
wxRadioBox
(
itemDialog1
,
ID_SET_PRINT_SCALE
,
_
(
"Approx. Scale:"
),
wxDefaultPosition
,
wxDefaultSize
,
9
,
m_ScaleOptionStrings
,
1
,
wxRA_SPECIFY_COLS
);
wxArrayString
m_ScaleOptionStrings
;
m_ScaleOptionStrings
.
Add
(
_
(
"fit in page"
));
m_ScaleOptionStrings
.
Add
(
_
(
"Scale 0.5"
));
m_ScaleOptionStrings
.
Add
(
_
(
"Scale 0.7"
));
m_ScaleOptionStrings
.
Add
(
_
(
"Approx. Scale 1"
));
m_ScaleOptionStrings
.
Add
(
_
(
"Accurate Scale 1"
));
m_ScaleOptionStrings
.
Add
(
_
(
"Scale 1.4"
));
m_ScaleOptionStrings
.
Add
(
_
(
"Scale 2"
));
m_ScaleOptionStrings
.
Add
(
_
(
"Scale 3"
));
m_ScaleOptionStrings
.
Add
(
_
(
"Scale 4"
));
m_ScaleOption
=
new
wxRadioBox
(
itemDialog1
,
ID_SET_PRINT_SCALE
,
_
(
"Approx. Scale:"
),
wxDefaultPosition
,
wxDefaultSize
,
m_ScaleOptionStrings
,
1
,
wxRA_SPECIFY_COLS
);
m_ScaleOption
->
SetSelection
(
0
);
itemBoxSizer5
->
Add
(
m_ScaleOption
,
0
,
wxALIGN_CENTER_HORIZONTAL
|
wxALL
,
5
);
...
...
@@ -179,27 +179,24 @@ void WinEDA_PrintFrame::CreateControls()
m_Print_Mirror
->
SetValue
(
false
);
itemStaticBoxSizer13
->
Add
(
m_Print_Mirror
,
0
,
wxGROW
|
wxALL
,
5
);
wxString
m_ColorOptionStrings
[]
=
{
_
(
"Color"
),
_
(
"Black"
)
};
m_ColorOption
=
new
wxRadioBox
(
itemDialog1
,
ID_SET_BW
,
_
(
"Color Print:"
),
wxDefaultPosition
,
wxDefaultSize
,
2
,
m_ColorOptionStrings
,
1
,
wxRA_SPECIFY_COLS
);
wxArrayString
m_ColorOptionStrings
;
m_ColorOptionStrings
.
Add
(
_
(
"Color"
));
m_ColorOptionStrings
.
Add
(
_
(
"Black"
));
m_ColorOption
=
new
wxRadioBox
(
itemDialog1
,
ID_SET_BW
,
_
(
"Color Print:"
),
wxDefaultPosition
,
wxDefaultSize
,
m_ColorOptionStrings
,
1
,
wxRA_SPECIFY_COLS
);
m_ColorOption
->
SetSelection
(
0
);
itemBoxSizer12
->
Add
(
m_ColorOption
,
0
,
wxGROW
|
wxALL
,
5
);
wxString
m_PagesOptionPcbStrings
[]
=
{
_
(
"1 page per layer"
),
_
(
"Single Page"
)
};
m_PagesOptionPcb
=
new
wxRadioBox
(
itemDialog1
,
ID_PRINT_ALL_IN_ONE
,
_
(
"Page Print:"
),
wxDefaultPosition
,
wxDefaultSize
,
2
,
m_PagesOptionPcbStrings
,
1
,
wxRA_SPECIFY_COLS
);
wxArrayString
m_PagesOptionPcbStrings
;
m_PagesOptionPcbStrings
.
Add
(
_
(
"1 Page per Layer"
));
m_PagesOptionPcbStrings
.
Add
(
_
(
"Single Page"
));
m_PagesOptionPcb
=
new
wxRadioBox
(
itemDialog1
,
ID_PRINT_ALL_IN_ONE
,
_
(
"Page Print:"
),
wxDefaultPosition
,
wxDefaultSize
,
m_PagesOptionPcbStrings
,
1
,
wxRA_SPECIFY_COLS
);
m_PagesOptionPcb
->
SetSelection
(
0
);
itemBoxSizer12
->
Add
(
m_PagesOptionPcb
,
0
,
wxGROW
|
wxALL
,
5
);
wxString
m_PagesOptionEeschemaStrings
[]
=
{
_
(
"Current"
),
_
(
"All"
)
};
m_PagesOptionEeschema
=
new
wxRadioBox
(
itemDialog1
,
ID_PRINT_ALL
,
_
(
"Page Print:"
),
wxDefaultPosition
,
wxDefaultSize
,
2
,
m_PagesOptionEeschemaStrings
,
1
,
wxRA_SPECIFY_COLS
);
wxArrayString
m_PagesOptionEeschemaStrings
;
m_PagesOptionEeschemaStrings
.
Add
(
_
(
"Current"
));
m_PagesOptionEeschemaStrings
.
Add
(
_
(
"All"
));
m_PagesOptionEeschema
=
new
wxRadioBox
(
itemDialog1
,
ID_PRINT_ALL
,
_
(
"Page Print:"
),
wxDefaultPosition
,
wxDefaultSize
,
m_PagesOptionEeschemaStrings
,
1
,
wxRA_SPECIFY_COLS
);
m_PagesOptionEeschema
->
SetSelection
(
0
);
itemBoxSizer12
->
Add
(
m_PagesOptionEeschema
,
0
,
wxGROW
|
wxALL
,
5
);
...
...
@@ -222,8 +219,9 @@ void WinEDA_PrintFrame::CreateControls()
itemButton25
->
SetForegroundColour
(
wxColour
(
0
,
128
,
64
));
itemBoxSizer21
->
Add
(
itemButton25
,
0
,
wxGROW
|
wxALL
,
5
);
wxButton
*
itemButton26
=
new
wxButton
(
itemDialog1
,
wxID_CLOSE
,
_
(
"&Close"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
itemBoxSizer21
->
Add
(
itemButton26
,
0
,
wxGROW
|
wxALL
,
5
);
m_CloseButton
=
new
wxButton
(
itemDialog1
,
wxID_CANCEL
,
_
(
"&Close"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_CloseButton
->
SetDefault
();
itemBoxSizer21
->
Add
(
m_CloseButton
,
0
,
wxGROW
|
wxALL
,
5
);
// Set validators
m_ScaleOption
->
SetValidator
(
wxGenericValidator
(
&
s_Scale_Select
)
);
...
...
@@ -233,6 +231,7 @@ void WinEDA_PrintFrame::CreateControls()
m_PagesOptionEeschema
->
SetValidator
(
wxGenericValidator
(
&
s_OptionPrintPage
)
);
////@end WinEDA_PrintFrame content construction
m_CloseButton
->
SetFocus
(
);
// add this line to close dialog by the escape key
m_DialogPenWidth
=
new
WinEDA_ValueCtrl
(
this
,
_
(
"Pen width mini"
),
s_PrintPenMinWidth
,
g_UnitMetric
,
m_DialogPenWidthSizer
,
m_Parent
->
m_InternalUnits
);
...
...
@@ -304,7 +303,7 @@ void WinEDA_PrintFrame::OnPrintExecuteClick( wxCommandEvent& event )
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE
*/
void
WinEDA_PrintFrame
::
OnC
lose
Click
(
wxCommandEvent
&
event
)
void
WinEDA_PrintFrame
::
OnC
ancel
Click
(
wxCommandEvent
&
event
)
{
OnClosePrintDialog
();
}
...
...
share/dialog_print.h
View file @
72357970
...
...
@@ -99,8 +99,8 @@ public:
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_PRINT_EXECUTE
void
OnPrintExecuteClick
(
wxCommandEvent
&
event
);
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_C
LOSE
void
OnC
lose
Click
(
wxCommandEvent
&
event
);
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_C
ANCEL
void
OnC
ancel
Click
(
wxCommandEvent
&
event
);
////@end WinEDA_PrintFrame event handler declarations
...
...
@@ -142,6 +142,7 @@ public:
wxRadioBox
*
m_ColorOption
;
wxRadioBox
*
m_PagesOptionPcb
;
wxRadioBox
*
m_PagesOptionEeschema
;
wxButton
*
m_CloseButton
;
////@end WinEDA_PrintFrame member variables
WinEDA_DrawFrame
*
m_Parent
;
...
...
share/dialog_print.pjd
View file @
72357970
This diff is collapsed.
Click to expand it.
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