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
99ab2dca
Commit
99ab2dca
authored
Apr 17, 2010
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Plain Diff
minor bug 564619 fixed and minor enhancements (mainly for Cvpcb)
parents
d64410b1
d4c811fc
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
39 additions
and
39 deletions
+39
-39
class_drawsheet.cpp
eeschema/class_drawsheet.cpp
+8
-1
class_drawsheet.h
eeschema/class_drawsheet.h
+4
-2
schedit.cpp
eeschema/schedit.cpp
+1
-1
class_board.cpp
pcbnew/class_board.cpp
+7
-22
class_module.cpp
pcbnew/class_module.cpp
+8
-10
moduleframe.cpp
pcbnew/moduleframe.cpp
+6
-3
toolbars_update_user_interface.cpp
pcbnew/toolbars_update_user_interface.cpp
+5
-0
No files found.
eeschema/class_drawsheet.cpp
View file @
99ab2dca
...
@@ -239,9 +239,11 @@ void SCH_SHEET::Place( WinEDA_SchematicFrame* frame, wxDC* DC )
...
@@ -239,9 +239,11 @@ void SCH_SHEET::Place( WinEDA_SchematicFrame* frame, wxDC* DC )
* @param aFrame = the schematic frame
* @param aFrame = the schematic frame
*/
*/
void
SCH_SHEET
::
CleanupSheet
(
WinEDA_SchematicFrame
*
aFrame
,
void
SCH_SHEET
::
CleanupSheet
(
WinEDA_SchematicFrame
*
aFrame
,
bool
aRedraw
)
bool
aRedraw
,
bool
aSaveForUndoRedo
)
{
{
SCH_SHEET_PIN
*
Pinsheet
,
*
NextPinsheet
;
SCH_SHEET_PIN
*
Pinsheet
,
*
NextPinsheet
;
bool
isSaved
=
false
;
if
(
!
IsOK
(
aFrame
,
_
(
"Ok to cleanup this sheet"
)
)
)
if
(
!
IsOK
(
aFrame
,
_
(
"Ok to cleanup this sheet"
)
)
)
return
;
return
;
...
@@ -268,6 +270,11 @@ void SCH_SHEET::CleanupSheet( WinEDA_SchematicFrame* aFrame,
...
@@ -268,6 +270,11 @@ void SCH_SHEET::CleanupSheet( WinEDA_SchematicFrame* aFrame,
NextPinsheet
=
Pinsheet
->
Next
();
NextPinsheet
=
Pinsheet
->
Next
();
if
(
HLabel
==
NULL
)
// Hlabel not found: delete pinsheet
if
(
HLabel
==
NULL
)
// Hlabel not found: delete pinsheet
{
{
if
(
aSaveForUndoRedo
&&
!
isSaved
)
{
isSaved
=
true
;
aFrame
->
SaveCopyInUndoList
(
this
,
UR_CHANGED
);
}
aFrame
->
OnModify
(
);
aFrame
->
OnModify
(
);
aFrame
->
DeleteSheetLabel
(
false
,
Pinsheet
);
aFrame
->
DeleteSheetLabel
(
false
,
Pinsheet
);
}
}
...
...
eeschema/class_drawsheet.h
View file @
99ab2dca
...
@@ -178,10 +178,12 @@ public:
...
@@ -178,10 +178,12 @@ public:
/** Function CleanupSheet
/** Function CleanupSheet
* Delete pinsheets which are not corresponding to a hierarchical label
* Delete pinsheets which are not corresponding to a hierarchical label
* @param aRedraw = true to redraw Sheet
* @param aFrame = the schematic frame
* @param aFrame = the schematic frame
* @param aRedraw = true to redraw Sheet
* @param aSaveForUndoRedo = true to put this sheet in UndoRedo list,
* if it is modified.
*/
*/
void
CleanupSheet
(
WinEDA_SchematicFrame
*
frame
,
bool
aRedraw
);
void
CleanupSheet
(
WinEDA_SchematicFrame
*
frame
,
bool
aRedraw
,
bool
aSaveForUndoRedo
);
/** Function GetPenSize
/** Function GetPenSize
* @return the size of the "pen" that be used to draw or plot this item
* @return the size of the "pen" that be used to draw or plot this item
...
...
eeschema/schedit.cpp
View file @
99ab2dca
...
@@ -383,7 +383,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -383,7 +383,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_POPUP_SCH_CLEANUP_SHEET
:
case
ID_POPUP_SCH_CLEANUP_SHEET
:
if
(
screen
->
GetCurItem
()
if
(
screen
->
GetCurItem
()
&&
screen
->
GetCurItem
()
->
Type
()
==
DRAW_SHEET_STRUCT_TYPE
)
&&
screen
->
GetCurItem
()
->
Type
()
==
DRAW_SHEET_STRUCT_TYPE
)
(
(
SCH_SHEET
*
)
screen
->
GetCurItem
()
)
->
CleanupSheet
(
this
,
true
);
(
(
SCH_SHEET
*
)
screen
->
GetCurItem
()
)
->
CleanupSheet
(
this
,
true
,
true
);
break
;
break
;
case
ID_POPUP_SCH_EDIT_PINSHEET
:
case
ID_POPUP_SCH_EDIT_PINSHEET
:
...
...
pcbnew/class_board.cpp
View file @
99ab2dca
...
@@ -791,34 +791,19 @@ bool BOARD::ComputeBoundaryBox()
...
@@ -791,34 +791,19 @@ bool BOARD::ComputeBoundaryBox()
}
}
}
}
/* Anal
is
e footprints */
/* Anal
yz
e footprints */
for
(
MODULE
*
module
=
m_Modules
;
module
;
module
=
module
->
Next
()
)
for
(
MODULE
*
module
=
m_Modules
;
module
;
module
=
module
->
Next
()
)
{
{
hasItems
=
TRUE
;
hasItems
=
TRUE
;
xmin
=
MIN
(
xmin
,
(
module
->
m_Pos
.
x
EDA_Rect
box
=
module
->
GetBoundingBox
();
+
module
->
m_BoundaryBox
.
GetX
()
)
);
xmin
=
MIN
(
xmin
,
box
.
GetX
()
);
ymin
=
MIN
(
ymin
,
(
module
->
m_Pos
.
y
ymin
=
MIN
(
ymin
,
box
.
GetY
()
);
+
module
->
m_BoundaryBox
.
GetY
()
)
);
xmax
=
MAX
(
xmax
,
box
.
GetRight
()
);
xmax
=
MAX
(
xmax
,
module
->
m_Pos
.
x
ymax
=
MAX
(
ymax
,
box
.
GetBottom
()
);
+
module
->
m_BoundaryBox
.
GetRight
()
);
ymax
=
MAX
(
ymax
,
module
->
m_Pos
.
y
+
module
->
m_BoundaryBox
.
GetBottom
()
);
for
(
D_PAD
*
pt_pad
=
module
->
m_Pads
;
pt_pad
;
pt_pad
=
pt_pad
->
Next
()
)
{
const
wxPoint
&
pos
=
pt_pad
->
GetPosition
();
d
=
pt_pad
->
m_Rayon
;
xmin
=
MIN
(
xmin
,
pos
.
x
-
d
);
ymin
=
MIN
(
ymin
,
pos
.
y
-
d
);
xmax
=
MAX
(
xmax
,
pos
.
x
+
d
);
ymax
=
MAX
(
ymax
,
pos
.
y
+
d
);
}
}
}
/* Anali
s
e track and zones */
/* Anali
z
e track and zones */
for
(
TRACK
*
track
=
m_Track
;
track
;
track
=
track
->
Next
()
)
for
(
TRACK
*
track
=
m_Track
;
track
;
track
=
track
->
Next
()
)
{
{
d
=
(
track
->
m_Width
/
2
)
+
1
;
d
=
(
track
->
m_Width
/
2
)
+
1
;
...
...
pcbnew/class_module.cpp
View file @
99ab2dca
...
@@ -623,11 +623,10 @@ int MODULE::ReadDescr( FILE* File, int* LineNum )
...
@@ -623,11 +623,10 @@ int MODULE::ReadDescr( FILE* File, int* LineNum )
/* Update the bounding rectangle of the module
/* Update the bounding rectangle of the module
*
*
* The rectangle is the rectangle with the contours and
* The bounding box includes outlines and pads, but not the fields.
* Pads.
* The rectangle is:
* The rectangle is calculated:
* for orientation 0
* For East 0
* coordinates relative to the module anchor.
* Coord in on / anchor position
*/
*/
void
MODULE
::
Set_Rectangle_Encadrement
()
void
MODULE
::
Set_Rectangle_Encadrement
()
{
{
...
@@ -702,10 +701,9 @@ void MODULE::Set_Rectangle_Encadrement()
...
@@ -702,10 +701,9 @@ void MODULE::Set_Rectangle_Encadrement()
}
}
/* Equivalent to Module:: Set_Rectangle_Encadrement() coord but real:
/* Equivalent to Module::Set_Rectangle_Encadrement() but in board coordinates:
* Updating the rectangle real module PCB cad in ord
* Updates the module bounding box on the board
* Entree: pointer module
* The rectangle is the rectangle with outlines and pads, but not the fields
* The rectangle is the rectangle with the contours and pads.
* Also updates the surface (.M_Surface) module.
* Also updates the surface (.M_Surface) module.
*/
*/
void
MODULE
::
SetRectangleExinscrit
()
void
MODULE
::
SetRectangleExinscrit
()
...
@@ -785,7 +783,7 @@ void MODULE::SetRectangleExinscrit()
...
@@ -785,7 +783,7 @@ void MODULE::SetRectangleExinscrit()
/**
/**
* Function GetBoundingBox
* Function GetBoundingBox
* returns the full bounding box of this Footprint, including
text
s
* returns the full bounding box of this Footprint, including
field
s
* Mainly used to redraw the screen area occupied by the footprint
* Mainly used to redraw the screen area occupied by the footprint
*/
*/
EDA_Rect
MODULE
::
GetBoundingBox
()
EDA_Rect
MODULE
::
GetBoundingBox
()
...
...
pcbnew/moduleframe.cpp
View file @
99ab2dca
...
@@ -288,7 +288,6 @@ void WinEDA_ModuleEditFrame::SetToolbars()
...
@@ -288,7 +288,6 @@ void WinEDA_ModuleEditFrame::SetToolbars()
m_HToolBar
->
EnableTool
(
ID_MODEDIT_SAVE_LIBMODULE
,
active
&&
islib
);
m_HToolBar
->
EnableTool
(
ID_MODEDIT_SAVE_LIBMODULE
,
active
&&
islib
);
MODULE
*
module_in_edit
=
GetBoard
()
->
m_Modules
;
MODULE
*
module_in_edit
=
GetBoard
()
->
m_Modules
;
if
(
module_in_edit
&&
module_in_edit
->
m_Link
)
// this is not a new module
if
(
module_in_edit
&&
module_in_edit
->
m_Link
)
// this is not a new module
// ...
{
{
BOARD
*
mainpcb
=
frame
->
GetBoard
();
BOARD
*
mainpcb
=
frame
->
GetBoard
();
MODULE
*
source_module
=
mainpcb
->
m_Modules
;
MODULE
*
source_module
=
mainpcb
->
m_Modules
;
...
@@ -334,7 +333,7 @@ void WinEDA_ModuleEditFrame::SetToolbars()
...
@@ -334,7 +333,7 @@ void WinEDA_ModuleEditFrame::SetToolbars()
{
{
m_HToolBar
->
EnableTool
(
ID_MODEDIT_LOAD_MODULE_FROM_BOARD
,
false
);
m_HToolBar
->
EnableTool
(
ID_MODEDIT_LOAD_MODULE_FROM_BOARD
,
false
);
}
}
m_HToolBar
->
Refresh
();
if
(
m_VToolBar
)
if
(
m_VToolBar
)
{
{
...
@@ -345,6 +344,7 @@ void WinEDA_ModuleEditFrame::SetToolbars()
...
@@ -345,6 +344,7 @@ void WinEDA_ModuleEditFrame::SetToolbars()
m_VToolBar
->
EnableTool
(
ID_PCB_ADD_TEXT_BUTT
,
active
);
m_VToolBar
->
EnableTool
(
ID_PCB_ADD_TEXT_BUTT
,
active
);
m_VToolBar
->
EnableTool
(
ID_MODEDIT_PLACE_ANCHOR
,
active
);
m_VToolBar
->
EnableTool
(
ID_MODEDIT_PLACE_ANCHOR
,
active
);
m_VToolBar
->
EnableTool
(
ID_PCB_DELETE_ITEM_BUTT
,
active
);
m_VToolBar
->
EnableTool
(
ID_PCB_DELETE_ITEM_BUTT
,
active
);
m_VToolBar
->
Refresh
();
}
}
if
(
m_OptionsToolBar
)
if
(
m_OptionsToolBar
)
...
@@ -382,7 +382,8 @@ void WinEDA_ModuleEditFrame::SetToolbars()
...
@@ -382,7 +382,8 @@ void WinEDA_ModuleEditFrame::SetToolbars()
m_DisplayPadFill
?
m_DisplayPadFill
?
_
(
"Show pads in sketch mode"
)
:
_
(
"Show pads in sketch mode"
)
:
_
(
"Show pads in filled mode"
)
);
_
(
"Show pads in filled mode"
)
);
}
m_OptionsToolBar
->
Refresh
();
}
if
(
m_AuxiliaryToolBar
)
if
(
m_AuxiliaryToolBar
)
{
{
...
@@ -406,6 +407,8 @@ void WinEDA_ModuleEditFrame::SetToolbars()
...
@@ -406,6 +407,8 @@ void WinEDA_ModuleEditFrame::SetToolbars()
if
(
m_SelGridBox
)
if
(
m_SelGridBox
)
m_SelGridBox
->
SetSelection
(
m_LastGridSizeId
);
m_SelGridBox
->
SetSelection
(
m_LastGridSizeId
);
m_AuxiliaryToolBar
->
Refresh
();
}
}
DisplayUnitsMsg
();
DisplayUnitsMsg
();
...
...
pcbnew/toolbars_update_user_interface.cpp
View file @
99ab2dca
...
@@ -141,6 +141,9 @@ void WinEDA_PcbFrame::AuxiliaryToolBar_Update_UI()
...
@@ -141,6 +141,9 @@ void WinEDA_PcbFrame::AuxiliaryToolBar_Update_UI()
m_SelGridBox
->
SetSelection
(
m_LastGridSizeId
);
m_SelGridBox
->
SetSelection
(
m_LastGridSizeId
);
m_TrackAndViasSizesList_Changed
=
false
;
m_TrackAndViasSizesList_Changed
=
false
;
m_AuxiliaryToolBar
->
Refresh
();
}
}
...
@@ -181,6 +184,7 @@ void WinEDA_PcbFrame::SetToolbars()
...
@@ -181,6 +184,7 @@ void WinEDA_PcbFrame::SetToolbars()
state
=
GetScreen
()
->
GetRedoCommandCount
()
>
0
;
state
=
GetScreen
()
->
GetRedoCommandCount
()
>
0
;
m_HToolBar
->
EnableTool
(
wxID_REDO
,
state
);
m_HToolBar
->
EnableTool
(
wxID_REDO
,
state
);
m_HToolBar
->
Refresh
();
if
(
m_OptionsToolBar
)
if
(
m_OptionsToolBar
)
{
{
...
@@ -267,6 +271,7 @@ void WinEDA_PcbFrame::SetToolbars()
...
@@ -267,6 +271,7 @@ void WinEDA_PcbFrame::SetToolbars()
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1
,
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1
,
m_auimgr
.
GetPane
(
wxT
(
"m_AuxVToolBar"
)).
IsShown
()
);
m_auimgr
.
GetPane
(
wxT
(
"m_AuxVToolBar"
)).
IsShown
()
);
m_OptionsToolBar
->
Refresh
();
}
}
if
(
m_AuxiliaryToolBar
)
if
(
m_AuxiliaryToolBar
)
...
...
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