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
4865a68f
Commit
4865a68f
authored
Mar 28, 2013
by
Lorenzo Marcantonio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extremely trivial stuff (mostly cosmetics)
parent
5a5b9098
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
40 additions
and
51 deletions
+40
-51
dialog_edit_label.cpp
eeschema/dialogs/dialog_edit_label.cpp
+1
-1
dialog_print_using_printer.cpp
gerbview/dialogs/dialog_print_using_printer.cpp
+1
-1
attribut.cpp
pcbnew/attribut.cpp
+1
-1
class_text_mod.h
pcbnew/class_text_mod.h
+0
-11
clean.cpp
pcbnew/clean.cpp
+11
-11
connect.cpp
pcbnew/connect.cpp
+1
-1
deltrack.cpp
pcbnew/deltrack.cpp
+1
-1
dialog_edit_module_text.cpp
pcbnew/dialogs/dialog_edit_module_text.cpp
+1
-1
dragsegm.cpp
pcbnew/dragsegm.cpp
+4
-4
modules.cpp
pcbnew/modules.cpp
+4
-4
move-drag_pads.cpp
pcbnew/move-drag_pads.cpp
+2
-2
tr_modif.cpp
pcbnew/tr_modif.cpp
+13
-13
No files found.
eeschema/dialogs/dialog_edit_label.cpp
View file @
4865a68f
...
...
@@ -140,7 +140,7 @@ void DIALOG_LABEL_EDITOR::InitDialog()
break
;
}
int
MINTEXTWIDTH
=
40
;
// M's are big characters, a few establish a lot of width
const
int
MINTEXTWIDTH
=
40
;
// M's are big characters, a few establish a lot of width
int
max_len
=
0
;
...
...
gerbview/dialogs/dialog_print_using_printer.cpp
View file @
4865a68f
...
...
@@ -138,7 +138,7 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( )
s_Parameters
.
m_PageSetupData
=
g_pageSetupData
;
layer_max
=
32
;
/
* Create layer list */
/
/ Create layer list
int
mask
=
1
,
ii
;
for
(
ii
=
0
;
ii
<
layer_max
;
ii
++
,
mask
<<=
1
)
{
...
...
pcbnew/attribut.cpp
View file @
4865a68f
...
...
@@ -80,7 +80,7 @@ void PCB_EDIT_FRAME::Attribut_Track( TRACK* track, wxDC* DC, bool Flag_On )
for
(
;
(
Track
!=
NULL
)
&&
(
nb_segm
>
0
);
nb_segm
--
)
{
Track
->
SetState
(
TRACK_LOCKED
,
Flag_On
);
Track
->
SetState
(
BUSY
,
OFF
);
Track
->
SetState
(
BUSY
,
false
);
Track
=
Track
->
Next
();
}
...
...
pcbnew/class_text_mod.h
View file @
4865a68f
...
...
@@ -132,17 +132,6 @@ public:
bool
IsOnLayer
(
int
aLayer
)
const
;
/*
* Function IsOnOneOfTheseLayers
* returns true if this object is on one of the given layers. Is virtual
* so objects like D_PAD, which reside on multiple layers, can do their own
* form of testing.
* virtual inheritance from BOARD_ITEM. (not yet written)
* @param aLayerMask The bit-mapped set of layers to test for.
* @return bool - true if on one of the given layers, else false.
* bool IsOnOneOfTheseLayers( int aLayerMask ) const;
*/
wxString
GetClass
()
const
{
...
...
pcbnew/clean.cpp
View file @
4865a68f
...
...
@@ -345,7 +345,7 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks()
if
(
other
&&
other
->
Type
()
==
PCB_VIA_T
)
{
// search for another segment following the via
track
->
SetState
(
BUSY
,
ON
);
track
->
SetState
(
BUSY
,
true
);
SEGVIA
*
via
=
(
SEGVIA
*
)
other
;
other
=
via
->
GetTrace
(
m_Brd
->
m_Track
,
NULL
,
FLG_START
);
...
...
@@ -360,7 +360,7 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks()
if
(
(
other
==
NULL
)
&&
(
zone
==
NULL
)
)
flag_erase
|=
2
;
track
->
SetState
(
BUSY
,
OFF
);
track
->
SetState
(
BUSY
,
false
);
}
}
}
...
...
@@ -401,7 +401,7 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks()
{
// search for another segment following the via
track
->
SetState
(
BUSY
,
ON
);
track
->
SetState
(
BUSY
,
true
);
SEGVIA
*
via
=
(
SEGVIA
*
)
other
;
other
=
via
->
GetTrace
(
m_Brd
->
m_Track
,
NULL
,
FLG_END
);
...
...
@@ -416,7 +416,7 @@ bool TRACKS_CLEANER::deleteUnconnectedTracks()
if
(
(
other
==
NULL
)
&&
(
zone
==
NULL
)
)
flag_erase
|=
0x20
;
track
->
SetState
(
BUSY
,
OFF
);
track
->
SetState
(
BUSY
,
false
);
}
}
}
...
...
@@ -520,9 +520,9 @@ bool TRACKS_CLEANER::clean_segments()
break
;
// We must have only one segment connected
segStart
->
SetState
(
BUSY
,
ON
);
segStart
->
SetState
(
BUSY
,
true
);
other
=
segment
->
GetTrace
(
m_Brd
->
m_Track
,
NULL
,
FLG_START
);
segStart
->
SetState
(
BUSY
,
OFF
);
segStart
->
SetState
(
BUSY
,
false
);
if
(
other
==
NULL
)
flag
=
1
;
// OK
...
...
@@ -558,9 +558,9 @@ bool TRACKS_CLEANER::clean_segments()
break
;
// We must have only one segment connected
segEnd
->
SetState
(
BUSY
,
ON
);
segEnd
->
SetState
(
BUSY
,
true
);
other
=
segment
->
GetTrace
(
m_Brd
->
m_Track
,
NULL
,
FLG_END
);
segEnd
->
SetState
(
BUSY
,
OFF
);
segEnd
->
SetState
(
BUSY
,
false
);
if
(
other
==
NULL
)
flag
|=
2
;
// Ok
...
...
@@ -731,7 +731,7 @@ bool PCB_EDIT_FRAME::RemoveMisConnectedTracks()
for
(
segment
=
GetBoard
()
->
m_Track
;
segment
;
segment
=
(
TRACK
*
)
segment
->
Next
()
)
{
segment
->
SetState
(
FLAG0
,
OFF
);
segment
->
SetState
(
FLAG0
,
false
);
// find the netcode for segment using anything connected to the "start" of "segment"
net_code_s
=
-
1
;
...
...
@@ -773,7 +773,7 @@ bool PCB_EDIT_FRAME::RemoveMisConnectedTracks()
// Netcodes do not agree, so mark the segment as "to be removed"
if
(
net_code_s
!=
net_code_e
)
{
segment
->
SetState
(
FLAG0
,
ON
);
segment
->
SetState
(
FLAG0
,
true
);
}
}
...
...
@@ -784,7 +784,7 @@ bool PCB_EDIT_FRAME::RemoveMisConnectedTracks()
if
(
segment
->
GetState
(
FLAG0
)
)
// Segment is flagged to be removed
{
segment
->
SetState
(
FLAG0
,
OFF
);
segment
->
SetState
(
FLAG0
,
false
);
isModified
=
true
;
GetBoard
()
->
m_Status_Pcb
=
0
;
Remove_One_Track
(
NULL
,
segment
);
...
...
pcbnew/connect.cpp
View file @
4865a68f
...
...
@@ -840,7 +840,7 @@ void PCB_BASE_FRAME::RecalculateAllTracksNetcode()
curr_track
->
m_PadsConnected
.
clear
();
curr_track
->
start
=
NULL
;
curr_track
->
end
=
NULL
;
curr_track
->
SetState
(
BUSY
|
IN_EDIT
|
BEGIN_ONPAD
|
END_ONPAD
,
OFF
);
curr_track
->
SetState
(
BUSY
|
IN_EDIT
|
BEGIN_ONPAD
|
END_ONPAD
,
false
);
curr_track
->
SetZoneSubNet
(
0
);
curr_track
->
SetNet
(
0
);
// net code = 0 means not connected
}
...
...
pcbnew/deltrack.cpp
View file @
4865a68f
...
...
@@ -213,7 +213,7 @@ void PCB_EDIT_FRAME::Remove_One_Track( wxDC* DC, TRACK* pt_segm )
for
(
;
ii
<
segments_to_delete_count
;
ii
++
,
tracksegment
=
next_track
)
{
next_track
=
tracksegment
->
Next
();
tracksegment
->
SetState
(
BUSY
,
OFF
);
tracksegment
->
SetState
(
BUSY
,
false
);
D
(
std
::
cout
<<
__func__
<<
": track "
<<
tracksegment
<<
" status="
\
<<
TO_UTF8
(
TRACK
::
ShowState
(
tracksegment
->
GetState
(
-
1
)
)
)
\
...
...
pcbnew/dialogs/dialog_edit_module_text.cpp
View file @
4865a68f
...
...
@@ -134,7 +134,7 @@ void DialogEditModuleText::initDlg( )
PutValueInLocalUnits
(
*
m_TxtWidthCtlr
,
m_currentText
->
GetThickness
()
);
int
text_orient
=
m_currentText
->
GetOrientation
();
NORMALIZE_ANGLE_90
(
text_orient
)
NORMALIZE_ANGLE_90
(
text_orient
);
if
(
(
text_orient
!=
0
)
)
m_Orient
->
SetSelection
(
1
);
...
...
pcbnew/dragsegm.cpp
View file @
4865a68f
...
...
@@ -209,7 +209,7 @@ void DRAG_LIST::fillList( CONNECTIONS& aConnections )
TRACK
*
track
=
pad
->
m_TracksConnected
[
jj
];
track
->
start
=
NULL
;
track
->
end
=
NULL
;
track
->
SetState
(
START_ON_PAD
|
END_ON_PAD
|
BUSY
,
OFF
);
track
->
SetState
(
START_ON_PAD
|
END_ON_PAD
|
BUSY
,
false
);
}
}
...
...
@@ -226,13 +226,13 @@ void DRAG_LIST::fillList( CONNECTIONS& aConnections )
if
(
pad
->
HitTest
(
track
->
GetStart
()
)
)
{
track
->
start
=
pad
;
track
->
SetState
(
START_ON_PAD
,
ON
);
track
->
SetState
(
START_ON_PAD
,
false
);
}
if
(
pad
->
HitTest
(
track
->
GetEnd
()
)
)
{
track
->
end
=
pad
;
track
->
SetState
(
END_ON_PAD
,
ON
);
track
->
SetState
(
END_ON_PAD
,
false
);
}
DRAG_SEGM_PICKER
wrapper
(
track
);
...
...
@@ -407,7 +407,7 @@ void UndrawAndMarkSegmentsToDrag( EDA_DRAW_PANEL* aCanvas, wxDC* aDC )
TRACK
*
track
=
g_DragSegmentList
[
ii
].
m_Track
;
track
->
Draw
(
aCanvas
,
aDC
,
GR_XOR
);
track
->
SetState
(
IN_EDIT
,
ON
);
track
->
SetState
(
IN_EDIT
,
false
);
if
(
g_DragSegmentList
[
ii
].
m_Flag
&
STARTPOINT
)
track
->
SetFlags
(
STARTPOINT
);
...
...
pcbnew/modules.cpp
View file @
4865a68f
...
...
@@ -129,7 +129,7 @@ void PCB_EDIT_FRAME::StartMoveModule( MODULE* aModule, wxDC* aDC,
TRACK
*
segm
=
g_DragSegmentList
[
ii
].
m_Track
;
itemWrapper
.
SetItem
(
segm
);
itemWrapper
.
SetLink
(
segm
->
Clone
()
);
itemWrapper
.
GetLink
()
->
SetState
(
IN_EDIT
,
OFF
);
itemWrapper
.
GetLink
()
->
SetState
(
IN_EDIT
,
false
);
s_PickedList
.
PushItem
(
itemWrapper
);
}
...
...
@@ -179,7 +179,7 @@ void Abort_MoveOrCopyModule( EDA_DRAW_PANEL* Panel, wxDC* DC )
{
pt_segm
=
g_DragSegmentList
[
ii
].
m_Track
;
pt_segm
->
Draw
(
Panel
,
DC
,
GR_XOR
);
pt_segm
->
SetState
(
IN_EDIT
,
OFF
);
pt_segm
->
SetState
(
IN_EDIT
,
false
);
g_DragSegmentList
[
ii
].
RestoreInitialValues
();
pt_segm
->
Draw
(
Panel
,
DC
,
GR_OR
);
}
...
...
@@ -276,7 +276,7 @@ bool PCB_EDIT_FRAME::Delete_Module( MODULE* aModule, wxDC* aDC, bool aAskBeforeD
/* Remove module from list, and put it in undo command list */
m_Pcb
->
m_Modules
.
Remove
(
aModule
);
aModule
->
SetState
(
IS_DELETED
,
ON
);
aModule
->
SetState
(
IS_DELETED
,
true
);
SaveCopyInUndoList
(
aModule
,
UR_DELETED
);
if
(
aDC
&&
GetBoard
()
->
IsElementVisible
(
RATSNEST_VISIBLE
)
)
...
...
@@ -404,7 +404,7 @@ void PCB_BASE_FRAME::PlaceModule( MODULE* aModule, wxDC* aDC, bool aDoNotRecreat
for
(
unsigned
ii
=
0
;
ii
<
g_DragSegmentList
.
size
();
ii
++
)
{
TRACK
*
track
=
g_DragSegmentList
[
ii
].
m_Track
;
track
->
SetState
(
IN_EDIT
,
OFF
);
track
->
SetState
(
IN_EDIT
,
false
);
if
(
aDC
)
track
->
Draw
(
m_canvas
,
aDC
,
GR_OR
);
...
...
pcbnew/move-drag_pads.cpp
View file @
4865a68f
...
...
@@ -46,7 +46,7 @@ static void Abort_Move_Pad( EDA_DRAW_PANEL* Panel, wxDC* DC )
{
TRACK
*
Track
=
g_DragSegmentList
[
ii
].
m_Track
;
Track
->
Draw
(
Panel
,
DC
,
GR_XOR
);
Track
->
SetState
(
IN_EDIT
,
OFF
);
Track
->
SetState
(
IN_EDIT
,
false
);
g_DragSegmentList
[
ii
].
RestoreInitialValues
();
Track
->
Draw
(
Panel
,
DC
,
GR_OR
);
}
...
...
@@ -177,7 +177,7 @@ void PCB_BASE_FRAME::PlacePad( D_PAD* aPad, wxDC* DC )
if
(
g_DragSegmentList
[
ii
].
m_Pad_End
)
Track
->
SetEnd
(
aPad
->
GetPosition
()
);
Track
->
SetState
(
IN_EDIT
,
OFF
);
Track
->
SetState
(
IN_EDIT
,
false
);
if
(
DC
)
Track
->
Draw
(
m_canvas
,
DC
,
GR_OR
);
...
...
pcbnew/tr_modif.cpp
View file @
4865a68f
...
...
@@ -75,7 +75,7 @@ int PCB_EDIT_FRAME::EraseRedundantTrack( wxDC* aDC,
/* Reconstruct the complete track (the new track has to start on a segment of track).
*/
ListSetState
(
aNewTrack
,
aNewTrackSegmentsCount
,
BUSY
,
OFF
);
ListSetState
(
aNewTrack
,
aNewTrackSegmentsCount
,
BUSY
,
false
);
/* If the new track begins with a via, complete the track segment using
* the following segment as a reference because a via is often a hub of
...
...
@@ -114,7 +114,7 @@ int PCB_EDIT_FRAME::EraseRedundantTrack( wxDC* aDC,
for
(
pt_del
=
bufStart
;
pt_del
;
pt_del
=
pt_del
->
Next
()
)
{
// D( std::cout<<"track "<<pt_del<<" turning off BUSY | IN_EDIT | IS_LINKED"<<std::endl; )
pt_del
->
SetState
(
BUSY
|
IN_EDIT
|
IS_LINKED
,
OFF
);
pt_del
->
SetState
(
BUSY
|
IN_EDIT
|
IS_LINKED
,
false
);
if
(
pt_del
==
bufEnd
)
// Last segment reached
break
;
...
...
@@ -162,7 +162,7 @@ int PCB_EDIT_FRAME::EraseRedundantTrack( wxDC* aDC,
}
// Mark as deleted a new track (which is not involved in the search for other connections)
ListSetState
(
aNewTrack
,
aNewTrackSegmentsCount
,
IS_DELETED
,
ON
);
ListSetState
(
aNewTrack
,
aNewTrackSegmentsCount
,
IS_DELETED
,
true
);
/* A segment must be connected to the starting point, otherwise
* it is unnecessary to analyze the other point
...
...
@@ -172,7 +172,7 @@ int PCB_EDIT_FRAME::EraseRedundantTrack( wxDC* aDC,
if
(
pt_segm
==
NULL
)
// Not connected to the track starting point.
{
// Clear the delete flag.
ListSetState
(
aNewTrack
,
aNewTrackSegmentsCount
,
IS_DELETED
,
OFF
);
ListSetState
(
aNewTrack
,
aNewTrackSegmentsCount
,
IS_DELETED
,
false
);
return
0
;
}
...
...
@@ -191,7 +191,7 @@ int PCB_EDIT_FRAME::EraseRedundantTrack( wxDC* aDC,
{
if
(
pt_segm
->
GetState
(
IS_LINKED
)
==
0
)
{
pt_segm
->
SetState
(
IS_LINKED
,
ON
);
pt_segm
->
SetState
(
IS_LINKED
,
true
);
nbconnect
++
;
}
}
...
...
@@ -207,7 +207,7 @@ int PCB_EDIT_FRAME::EraseRedundantTrack( wxDC* aDC,
// Clear used flags
for
(
pt_del
=
bufStart
;
pt_del
;
pt_del
=
pt_del
->
Next
()
)
{
pt_del
->
SetState
(
BUSY
|
IS_DELETED
|
IN_EDIT
|
IS_LINKED
,
OFF
);
pt_del
->
SetState
(
BUSY
|
IS_DELETED
|
IN_EDIT
|
IS_LINKED
,
false
);
if
(
pt_del
==
bufEnd
)
// Last segment reached
break
;
...
...
@@ -217,8 +217,8 @@ int PCB_EDIT_FRAME::EraseRedundantTrack( wxDC* aDC,
}
// Mark trace as edited (which does not involve searching for other tracks)
ListSetState
(
aNewTrack
,
aNewTrackSegmentsCount
,
IS_DELETED
,
OFF
);
ListSetState
(
aNewTrack
,
aNewTrackSegmentsCount
,
IN_EDIT
,
ON
);
ListSetState
(
aNewTrack
,
aNewTrackSegmentsCount
,
IS_DELETED
,
false
);
ListSetState
(
aNewTrack
,
aNewTrackSegmentsCount
,
IN_EDIT
,
true
);
// Test all marked segments.
while
(
nbconnect
)
...
...
@@ -233,7 +233,7 @@ int PCB_EDIT_FRAME::EraseRedundantTrack( wxDC* aDC,
}
nbconnect
--
;
pt_del
->
SetState
(
IS_LINKED
,
OFF
);
pt_del
->
SetState
(
IS_LINKED
,
false
);
pt_del
=
GetBoard
()
->
MarkTrace
(
pt_del
,
&
nb_segm
,
NULL
,
NULL
,
true
);
...
...
@@ -278,13 +278,13 @@ int PCB_EDIT_FRAME::EraseRedundantTrack( wxDC* aDC,
{
if
(
pt_del
->
GetState
(
IN_EDIT
)
)
{
pt_del
->
SetState
(
IN_EDIT
,
OFF
);
pt_del
->
SetState
(
IN_EDIT
,
false
);
if
(
aDC
)
pt_del
->
Draw
(
m_canvas
,
aDC
,
GR_OR
);
}
pt_del
->
SetState
(
IN_EDIT
|
IS_LINKED
,
OFF
);
pt_del
->
SetState
(
IN_EDIT
|
IS_LINKED
,
false
);
}
return
1
;
...
...
@@ -292,13 +292,13 @@ int PCB_EDIT_FRAME::EraseRedundantTrack( wxDC* aDC,
}
// Clear BUSY flag here because the track did not get marked.
ListSetState
(
pt_del
,
nb_segm
,
BUSY
,
OFF
);
ListSetState
(
pt_del
,
nb_segm
,
BUSY
,
false
);
}
// Clear used flags
for
(
pt_del
=
m_Pcb
->
m_Track
;
pt_del
;
pt_del
=
pt_del
->
Next
()
)
{
pt_del
->
SetState
(
BUSY
|
IS_DELETED
|
IN_EDIT
|
IS_LINKED
,
OFF
);
pt_del
->
SetState
(
BUSY
|
IS_DELETED
|
IN_EDIT
|
IS_LINKED
,
false
);
if
(
pt_del
==
bufEnd
)
// Last segment reached
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