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
f64b2827
Commit
f64b2827
authored
Jan 15, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUGFIX: .mdc is incomplete after 'archive footprint'
parent
94cf5b0d
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
545 additions
and
524 deletions
+545
-524
wxPcbStruct.h
include/wxPcbStruct.h
+437
-423
librairi.cpp
pcbnew/librairi.cpp
+95
-88
modedit.cpp
pcbnew/modedit.cpp
+13
-13
No files found.
include/wxPcbStruct.h
View file @
f64b2827
...
@@ -90,6 +90,7 @@ public:
...
@@ -90,6 +90,7 @@ public:
return
m_Pcb
;
return
m_Pcb
;
}
}
// General
// General
virtual
void
OnCloseWindow
(
wxCloseEvent
&
Event
)
=
0
;
virtual
void
OnCloseWindow
(
wxCloseEvent
&
Event
)
=
0
;
virtual
void
Process_Special_Functions
(
wxCommandEvent
&
event
)
=
0
;
virtual
void
Process_Special_Functions
(
wxCommandEvent
&
event
)
=
0
;
...
@@ -199,8 +200,20 @@ public:
...
@@ -199,8 +200,20 @@ public:
MODULE
*
Exchange_Module
(
wxWindow
*
winaff
,
MODULE
*
Exchange_Module
(
wxWindow
*
winaff
,
MODULE
*
old_module
,
MODULE
*
old_module
,
MODULE
*
new_module
);
MODULE
*
new_module
);
int
Save_1_Module
(
const
wxString
&
LibName
,
MODULE
*
Module
,
bool
Overwrite
,
bool
DisplayDialog
);
/** Function Save_Module_In_Library
* Save in an existing library a given footprint
* @param aLibName = name of the library to use
* @param aModule = the given footprint
* @param aOverwrite = true to overwrite an existing footprint, false to abort an existing footprint is found
* @param aDisplayDialog = true to display a dialog to enter or confirm the footprint name
* @param aCreateDocFile = true to creates the associated doc file
* @return : 1 if OK,0 if abort
*/
int
Save_Module_In_Library
(
const
wxString
&
aLibName
,
MODULE
*
aModule
,
bool
aOverwrite
,
bool
aDisplayDialog
,
bool
aCreateDocFile
);
void
Archive_Modules
(
const
wxString
&
LibName
,
bool
NewModulesOnly
);
void
Archive_Modules
(
const
wxString
&
LibName
,
bool
NewModulesOnly
);
MODULE
*
Select_1_Module_From_BOARD
(
BOARD
*
Pcb
);
MODULE
*
Select_1_Module_From_BOARD
(
BOARD
*
Pcb
);
MODULE
*
GetModuleByName
();
MODULE
*
GetModuleByName
();
...
@@ -215,8 +228,9 @@ public:
...
@@ -215,8 +228,9 @@ public:
void
Place_Module
(
MODULE
*
module
,
wxDC
*
DC
);
void
Place_Module
(
MODULE
*
module
,
wxDC
*
DC
);
void
InstallExchangeModuleFrame
(
MODULE
*
ExchangeModuleModule
,
void
InstallExchangeModuleFrame
(
MODULE
*
ExchangeModuleModule
,
wxDC
*
DC
,
const
wxPoint
&
pos
);
wxDC
*
DC
,
const
wxPoint
&
pos
);
// Graphic items edition:
// Graphic items edition:
void
InstallGraphicItemPropertiesDialog
(
DRAWSEGMENT
*
aItem
,
wxDC
*
aDC
);
void
InstallGraphicItemPropertiesDialog
(
DRAWSEGMENT
*
aItem
,
wxDC
*
aDC
);
// module texts
// module texts
void
RotateTextModule
(
TEXTE_MODULE
*
Text
,
wxDC
*
DC
);
void
RotateTextModule
(
TEXTE_MODULE
*
Text
,
wxDC
*
DC
);
...
@@ -294,7 +308,6 @@ public:
...
@@ -294,7 +308,6 @@ public:
void
Block_Duplicate
(
wxDC
*
DC
);
void
Block_Duplicate
(
wxDC
*
DC
);
// layerhandling:
// layerhandling:
// (See pcbnew/sel_layer.cpp for description of why null_layer parameter is provided)
// (See pcbnew/sel_layer.cpp for description of why null_layer parameter is provided)
int
SelectLayer
(
int
default_layer
,
int
min_layer
,
int
max_layer
,
int
SelectLayer
(
int
default_layer
,
int
min_layer
,
int
max_layer
,
...
@@ -539,13 +552,12 @@ public:
...
@@ -539,13 +552,12 @@ public:
void
Delete_Zone_Fill
(
wxDC
*
DC
,
SEGZONE
*
Track
,
long
aTimestamp
=
0
);
void
Delete_Zone_Fill
(
wxDC
*
DC
,
SEGZONE
*
Track
,
long
aTimestamp
=
0
);
/** Function Delete_LastCreatedCorner
/** Function Delete_LastCreatedCorner
* Used only while creating a new zone outline
* Used only while creating a new zone outline
* Remove and delete the current outline segment in progress
* Remove and delete the current outline segment in progress
* @return 0 if no corner in list, or corner number
* @return 0 if no corner in list, or corner number
*/
*/
int
Delete_LastCreatedCorner
(
wxDC
*
DC
);
int
Delete_LastCreatedCorner
(
wxDC
*
DC
);
/**
/**
* Function Begin_Zone
* Function Begin_Zone
...
@@ -683,10 +695,12 @@ public:
...
@@ -683,10 +695,12 @@ public:
// Autoplacement:
// Autoplacement:
void
AutoPlace
(
wxCommandEvent
&
event
);
void
AutoPlace
(
wxCommandEvent
&
event
);
/** function OnOrientFootprints
/** function OnOrientFootprints
* install the dialog box for the comman Orient Footprints
* install the dialog box for the comman Orient Footprints
*/
*/
void
OnOrientFootprints
(
void
);
void
OnOrientFootprints
(
void
);
/** function ReOrientModules
/** function ReOrientModules
* Set the orientation of footprints
* Set the orientation of footprints
* @param ModuleMask = mask (wildcard allowed) selection
* @param ModuleMask = mask (wildcard allowed) selection
...
@@ -731,7 +745,7 @@ public:
...
@@ -731,7 +745,7 @@ public:
void
Edit_Gap
(
wxDC
*
DC
,
MODULE
*
Module
);
void
Edit_Gap
(
wxDC
*
DC
,
MODULE
*
Module
);
MODULE
*
Create_MuWaveBasicShape
(
const
wxString
&
name
,
int
pad_count
);
MODULE
*
Create_MuWaveBasicShape
(
const
wxString
&
name
,
int
pad_count
);
MODULE
*
Create_MuWaveComponent
(
int
shape_type
);
MODULE
*
Create_MuWaveComponent
(
int
shape_type
);
MODULE
*
Create_MuWavePolygonShape
(
);
MODULE
*
Create_MuWavePolygonShape
(
);
void
Begin_Self
(
wxDC
*
DC
);
void
Begin_Self
(
wxDC
*
DC
);
MODULE
*
Genere_Self
(
wxDC
*
DC
);
MODULE
*
Genere_Self
(
wxDC
*
DC
);
...
...
pcbnew/librairi.cpp
View file @
f64b2827
This diff is collapsed.
Click to expand it.
pcbnew/modedit.cpp
View file @
f64b2827
...
@@ -192,7 +192,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -192,7 +192,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
switch
(
id
)
// Traitement des commandes
switch
(
id
)
// Traitement des commandes
{
{
case
ID_EXIT
:
case
ID_EXIT
:
Close
(
TRUE
);
Close
(
true
);
break
;
break
;
case
ID_LIBEDIT_SELECT_CURRENT_LIB
:
case
ID_LIBEDIT_SELECT_CURRENT_LIB
:
...
@@ -209,7 +209,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -209,7 +209,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_MODEDIT_NEW_MODULE
:
case
ID_MODEDIT_NEW_MODULE
:
{
{
Clear_Pcb
(
TRUE
);
Clear_Pcb
(
true
);
GetScreen
()
->
ClearUndoRedoList
();
GetScreen
()
->
ClearUndoRedoList
();
SetCurItem
(
NULL
);
SetCurItem
(
NULL
);
GetScreen
()
->
m_Curseur
=
wxPoint
(
0
,
0
);
GetScreen
()
->
m_Curseur
=
wxPoint
(
0
,
0
);
...
@@ -220,7 +220,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -220,7 +220,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
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
);
}
}
}
}
break
;
break
;
...
@@ -229,7 +229,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -229,7 +229,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
{
{
wxString
Line
;
wxString
Line
;
Line
=
MakeFileName
(
g_RealLibDirBuffer
,
m_CurrentLib
.
GetData
(),
LibExtBuffer
);
Line
=
MakeFileName
(
g_RealLibDirBuffer
,
m_CurrentLib
.
GetData
(),
LibExtBuffer
);
Save_
1_Module
(
Line
,
GetBoard
()
->
m_Modules
,
TRUE
,
TRUE
);
Save_
Module_In_Library
(
Line
,
GetBoard
()
->
m_Modules
,
true
,
true
,
true
);
GetScreen
()
->
ClrModify
();
GetScreen
()
->
ClrModify
();
}
}
break
;
break
;
...
@@ -315,13 +315,13 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -315,13 +315,13 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_LIBEDIT_IMPORT_PART
:
case
ID_LIBEDIT_IMPORT_PART
:
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
);
Import_Module
(
&
dc
);
Import_Module
(
&
dc
);
if
(
GetBoard
()
->
m_Modules
)
if
(
GetBoard
()
->
m_Modules
)
GetBoard
()
->
m_Modules
->
m_Flags
=
0
;
GetBoard
()
->
m_Modules
->
m_Flags
=
0
;
GetScreen
()
->
ClrModify
();
GetScreen
()
->
ClrModify
();
Zoom_Automatique
(
TRUE
);
Zoom_Automatique
(
true
);
if
(
m_Draw3DFrame
)
if
(
m_Draw3DFrame
)
m_Draw3DFrame
->
NewDisplay
();
m_Draw3DFrame
->
NewDisplay
();
break
;
break
;
...
@@ -333,7 +333,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -333,7 +333,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_LIBEDIT_CREATE_NEW_LIB_AND_SAVE_CURRENT_PART
:
case
ID_LIBEDIT_CREATE_NEW_LIB_AND_SAVE_CURRENT_PART
:
if
(
GetBoard
()
->
m_Modules
)
if
(
GetBoard
()
->
m_Modules
)
Export_Module
(
GetBoard
()
->
m_Modules
,
TRUE
);
Export_Module
(
GetBoard
()
->
m_Modules
,
true
);
break
;
break
;
case
ID_MODEDIT_SHEET_SET
:
case
ID_MODEDIT_SHEET_SET
:
...
@@ -342,7 +342,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -342,7 +342,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_MODEDIT_LOAD_MODULE
:
case
ID_MODEDIT_LOAD_MODULE
:
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
(
m_CurrentLib
,
&
dc
);
if
(
GetBoard
()
->
m_Modules
)
if
(
GetBoard
()
->
m_Modules
)
...
@@ -365,7 +365,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -365,7 +365,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
}
}
}
}
GetScreen
()
->
ClrModify
();
GetScreen
()
->
ClrModify
();
Zoom_Automatique
(
TRUE
);
Zoom_Automatique
(
true
);
if
(
m_Draw3DFrame
)
if
(
m_Draw3DFrame
)
m_Draw3DFrame
->
NewDisplay
();
m_Draw3DFrame
->
NewDisplay
();
break
;
break
;
...
@@ -425,12 +425,12 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -425,12 +425,12 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_POPUP_PCB_ROTATE_MODULE_COUNTERCLOCKWISE
:
case
ID_POPUP_PCB_ROTATE_MODULE_COUNTERCLOCKWISE
:
DrawPanel
->
MouseToCursorSchema
();
DrawPanel
->
MouseToCursorSchema
();
Rotate_Module
(
&
dc
,
(
MODULE
*
)
GetScreen
()
->
GetCurItem
(),
900
,
TRUE
);
Rotate_Module
(
&
dc
,
(
MODULE
*
)
GetScreen
()
->
GetCurItem
(),
900
,
true
);
break
;
break
;
case
ID_POPUP_PCB_ROTATE_MODULE_CLOCKWISE
:
case
ID_POPUP_PCB_ROTATE_MODULE_CLOCKWISE
:
DrawPanel
->
MouseToCursorSchema
();
DrawPanel
->
MouseToCursorSchema
();
Rotate_Module
(
&
dc
,
(
MODULE
*
)
GetScreen
()
->
GetCurItem
(),
-
900
,
TRUE
);
Rotate_Module
(
&
dc
,
(
MODULE
*
)
GetScreen
()
->
GetCurItem
(),
-
900
,
true
);
break
;
break
;
case
ID_POPUP_PCB_EDIT_MODULE
:
case
ID_POPUP_PCB_EDIT_MODULE
:
...
@@ -587,12 +587,12 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -587,12 +587,12 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_MODEDIT_UNDO
:
case
ID_MODEDIT_UNDO
:
GetComponentFromUndoList
();
GetComponentFromUndoList
();
DrawPanel
->
Refresh
(
TRUE
);
DrawPanel
->
Refresh
(
true
);
break
;
break
;
case
ID_MODEDIT_REDO
:
case
ID_MODEDIT_REDO
:
GetComponentFromRedoList
();
GetComponentFromRedoList
();
DrawPanel
->
Refresh
(
TRUE
);
DrawPanel
->
Refresh
(
true
);
break
;
break
;
case
ID_POPUP_PLACE_BLOCK
:
case
ID_POPUP_PLACE_BLOCK
:
...
...
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