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
27ee8157
Commit
27ee8157
authored
Mar 30, 2013
by
Lorenzo Marcantonio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor flags and layer mask cleanup
parent
c650c378
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
35 additions
and
65 deletions
+35
-65
base_struct.cpp
common/base_struct.cpp
+1
-1
copy_to_clipboard.cpp
common/copy_to_clipboard.cpp
+1
-2
pcbcommon.cpp
common/pcbcommon.cpp
+0
-27
lib_pin.cpp
eeschema/lib_pin.cpp
+5
-7
onrightclick.cpp
eeschema/onrightclick.cpp
+1
-2
sch_bitmap.cpp
eeschema/sch_bitmap.cpp
+2
-2
sch_component.cpp
eeschema/sch_component.cpp
+2
-2
sch_junction.cpp
eeschema/sch_junction.cpp
+2
-2
sch_line.cpp
eeschema/sch_line.cpp
+7
-7
sch_marker.cpp
eeschema/sch_marker.cpp
+2
-2
sch_no_connect.cpp
eeschema/sch_no_connect.cpp
+2
-2
sch_sheet.cpp
eeschema/sch_sheet.cpp
+2
-2
sch_text.cpp
eeschema/sch_text.cpp
+3
-3
class_gbr_layout.cpp
gerbview/class_gbr_layout.cpp
+1
-1
class_gerber_draw_item.cpp
gerbview/class_gerber_draw_item.cpp
+1
-1
layers_id_colors_and_visibility.h
include/layers_id_colors_and_visibility.h
+1
-0
legacy_plugin.cpp
pcbnew/legacy_plugin.cpp
+2
-2
No files found.
common/base_struct.cpp
View file @
27ee8157
...
@@ -90,7 +90,7 @@ void EDA_ITEM::InitVars()
...
@@ -90,7 +90,7 @@ void EDA_ITEM::InitVars()
void
EDA_ITEM
::
SetModified
()
void
EDA_ITEM
::
SetModified
()
{
{
m_Flags
|=
IS_CHANGED
;
SetFlags
(
IS_CHANGED
)
;
// If this a child object, then the parent modification state also needs to be set.
// If this a child object, then the parent modification state also needs to be set.
if
(
m_Parent
)
if
(
m_Parent
)
...
...
common/copy_to_clipboard.cpp
View file @
27ee8157
...
@@ -109,8 +109,7 @@ bool DrawPageOnClipboard( EDA_DRAW_FRAME* aFrame )
...
@@ -109,8 +109,7 @@ bool DrawPageOnClipboard( EDA_DRAW_FRAME* aFrame )
dc
.
SetClippingRegion
(
DrawArea
);
dc
.
SetClippingRegion
(
DrawArea
);
}
}
const
int
maskLayer
=
0xFFFFFFFF
;
aFrame
->
PrintPage
(
&
dc
,
FULL_LAYERS
,
false
);
aFrame
->
PrintPage
(
&
dc
,
maskLayer
,
false
);
screen
->
m_IsPrinting
=
false
;
screen
->
m_IsPrinting
=
false
;
aFrame
->
GetCanvas
()
->
SetClipBox
(
tmp
);
aFrame
->
GetCanvas
()
->
SetClipBox
(
tmp
);
wxMetafile
*
mf
=
dc
.
Close
();
wxMetafile
*
mf
=
dc
.
Close
();
...
...
common/pcbcommon.cpp
View file @
27ee8157
...
@@ -42,33 +42,6 @@
...
@@ -42,33 +42,6 @@
class
MODULE
;
class
MODULE
;
/* return a one bit layer mask from a layer number
* aLayerNumber = the layer number to convert (0 .. LAYER_COUNT-1)
*/
int
GetLayerMask
(
int
aLayerNumber
)
{
wxASSERT
(
aLayerNumber
<
LAYER_COUNT
&&
aLayerNumber
>=
0
);
#if 0
// Look up Table for conversion one layer number -> one bit layer mask:
static int tabOneLayerMask[LAYER_COUNT] =
{
0x00000001, 0x00000002, 0x00000004, 0x00000008,
0x00000010, 0x00000020, 0x00000040, 0x00000080,
0x00000100, 0x00000200, 0x00000400, 0x00000800,
0x00001000, 0x00002000, 0x00004000, 0x00008000,
0x00010000, 0x00020000, 0x00040000, 0x00080000,
0x00100000, 0x00200000, 0x00400000, 0x00800000,
0x01000000, 0x02000000, 0x04000000, 0x08000000,
0x10000000, 0x20000000, 0x40000000, 0x80000000
};
return( tabOneLayerMask[aLayerNumber] );
#else
return
1
<<
aLayerNumber
;
#endif
}
/* Look up Table for conversion copper layer count -> general copper layer
/* Look up Table for conversion copper layer count -> general copper layer
* mask: */
* mask: */
LAYER_MSK
g_TabAllCopperLayerMask
[
NB_COPPER_LAYERS
]
=
{
LAYER_MSK
g_TabAllCopperLayerMask
[
NB_COPPER_LAYERS
]
=
{
...
...
eeschema/lib_pin.cpp
View file @
27ee8157
...
@@ -262,9 +262,7 @@ void LIB_PIN::SetNumber( const wxString& number )
...
@@ -262,9 +262,7 @@ void LIB_PIN::SetNumber( const wxString& number )
SetPinNumFromString
(
tmp
);
SetPinNumFromString
(
tmp
);
if
(
m_number
!=
oldNumber
)
if
(
m_number
!=
oldNumber
)
{
SetFlags
(
IS_CHANGED
);
m_Flags
|=
IS_CHANGED
;
}
/* Others pin numbers marked by EnableEditMode() are not modified
/* Others pin numbers marked by EnableEditMode() are not modified
* because each pin has its own number
* because each pin has its own number
...
@@ -437,7 +435,7 @@ void LIB_PIN::SetConversion( int style )
...
@@ -437,7 +435,7 @@ void LIB_PIN::SetConversion( int style )
return
;
return
;
m_Convert
=
style
;
m_Convert
=
style
;
m_Flags
|=
IS_CHANGED
;
SetFlags
(
IS_CHANGED
)
;
if
(
style
==
0
)
if
(
style
==
0
)
{
{
...
@@ -514,9 +512,9 @@ void LIB_PIN::EnableEditMode( bool enable, bool editPinByPin )
...
@@ -514,9 +512,9 @@ void LIB_PIN::EnableEditMode( bool enable, bool editPinByPin )
&&
!
IsNew
()
&&
!
IsNew
()
&&
editPinByPin
==
false
&&
editPinByPin
==
false
&&
enable
)
&&
enable
)
pinList
[
i
]
->
m_Flags
|=
IS_LINKED
|
IN_EDIT
;
pinList
[
i
]
->
SetFlags
(
IS_LINKED
|
IN_EDIT
)
;
else
else
pinList
[
i
]
->
m_Flags
&=
~
(
IS_LINKED
|
IN_EDIT
);
pinList
[
i
]
->
ClearFlags
(
IS_LINKED
|
IN_EDIT
);
}
}
}
}
...
@@ -650,7 +648,7 @@ bool LIB_PIN::Save( OUTPUTFORMATTER& aFormatter )
...
@@ -650,7 +648,7 @@ bool LIB_PIN::Save( OUTPUTFORMATTER& aFormatter )
if
(
aFormatter
.
Print
(
0
,
"
\n
"
)
<
0
)
if
(
aFormatter
.
Print
(
0
,
"
\n
"
)
<
0
)
return
false
;
return
false
;
m_Flags
&=
~
IS_CHANGED
;
ClearFlags
(
IS_CHANGED
)
;
return
true
;
return
true
;
}
}
...
...
eeschema/onrightclick.cpp
View file @
27ee8157
...
@@ -205,8 +205,7 @@ bool SCH_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
...
@@ -205,8 +205,7 @@ bool SCH_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
return
true
;
return
true
;
}
}
int
flags
=
item
->
GetFlags
();
bool
is_new
=
item
->
IsNew
();
bool
is_new
=
(
flags
&
IS_NEW
)
?
true
:
false
;
switch
(
item
->
Type
()
)
switch
(
item
->
Type
()
)
{
{
...
...
eeschema/sch_bitmap.cpp
View file @
27ee8157
...
@@ -255,9 +255,9 @@ bool SCH_BITMAP::IsSelectStateChanged( const wxRect& aRect )
...
@@ -255,9 +255,9 @@ bool SCH_BITMAP::IsSelectStateChanged( const wxRect& aRect )
bool
previousState
=
IsSelected
();
bool
previousState
=
IsSelected
();
if
(
aRect
.
Contains
(
m_Pos
)
)
if
(
aRect
.
Contains
(
m_Pos
)
)
m_Flags
|=
SELECTED
;
SetFlags
(
SELECTED
)
;
else
else
m_Flags
&=
~
SELECTED
;
ClearFlags
(
SELECTED
)
;
return
previousState
!=
IsSelected
();
return
previousState
!=
IsSelected
();
}
}
...
...
eeschema/sch_component.cpp
View file @
27ee8157
...
@@ -1607,9 +1607,9 @@ bool SCH_COMPONENT::IsSelectStateChanged( const wxRect& aRect )
...
@@ -1607,9 +1607,9 @@ bool SCH_COMPONENT::IsSelectStateChanged( const wxRect& aRect )
EDA_RECT
boundingBox
=
GetBoundingBox
();
EDA_RECT
boundingBox
=
GetBoundingBox
();
if
(
aRect
.
Intersects
(
boundingBox
)
)
if
(
aRect
.
Intersects
(
boundingBox
)
)
m_Flags
|=
SELECTED
;
SetFlags
(
SELECTED
)
;
else
else
m_Flags
&=
~
SELECTED
;
ClearFlags
(
SELECTED
)
;
return
previousState
!=
IsSelected
();
return
previousState
!=
IsSelected
();
}
}
...
...
eeschema/sch_junction.cpp
View file @
27ee8157
...
@@ -168,9 +168,9 @@ bool SCH_JUNCTION::IsSelectStateChanged( const wxRect& aRect )
...
@@ -168,9 +168,9 @@ bool SCH_JUNCTION::IsSelectStateChanged( const wxRect& aRect )
bool
previousState
=
IsSelected
();
bool
previousState
=
IsSelected
();
if
(
aRect
.
Contains
(
m_pos
)
)
if
(
aRect
.
Contains
(
m_pos
)
)
m_Flags
|=
SELECTED
;
SetFlags
(
SELECTED
)
;
else
else
m_Flags
&=
~
SELECTED
;
ClearFlags
(
SELECTED
)
;
return
previousState
!=
IsSelected
();
return
previousState
!=
IsSelected
();
}
}
...
...
eeschema/sch_line.cpp
View file @
27ee8157
...
@@ -436,22 +436,22 @@ bool SCH_LINE::IsSelectStateChanged( const wxRect& aRect )
...
@@ -436,22 +436,22 @@ bool SCH_LINE::IsSelectStateChanged( const wxRect& aRect )
if
(
aRect
.
Contains
(
m_start
)
&&
aRect
.
Contains
(
m_end
)
)
if
(
aRect
.
Contains
(
m_start
)
&&
aRect
.
Contains
(
m_end
)
)
{
{
m_Flags
|=
SELECTED
;
SetFlags
(
SELECTED
)
;
m_Flags
&=
~
(
STARTPOINT
|
ENDPOINT
);
ClearFlags
(
STARTPOINT
|
ENDPOINT
);
}
}
else
if
(
aRect
.
Contains
(
m_start
)
)
else
if
(
aRect
.
Contains
(
m_start
)
)
{
{
m_Flags
&=
~
STARTPOINT
;
ClearFlags
(
STARTPOINT
)
;
m_Flags
|=
(
SELECTED
|
ENDPOINT
);
SetFlags
(
SELECTED
|
ENDPOINT
);
}
}
else
if
(
aRect
.
Contains
(
m_end
)
)
else
if
(
aRect
.
Contains
(
m_end
)
)
{
{
m_Flags
&=
~
ENDPOINT
;
ClearFlags
(
ENDPOINT
)
;
m_Flags
|=
(
SELECTED
|
STARTPOINT
);
SetFlags
(
SELECTED
|
STARTPOINT
);
}
}
else
else
{
{
m_Flags
&=
~
(
SELECTED
|
STARTPOINT
|
ENDPOINT
);
ClearFlags
(
SELECTED
|
STARTPOINT
|
ENDPOINT
);
}
}
return
previousState
!=
IsSelected
();
return
previousState
!=
IsSelected
();
...
...
eeschema/sch_marker.cpp
View file @
27ee8157
...
@@ -193,9 +193,9 @@ bool SCH_MARKER::IsSelectStateChanged( const wxRect& aRect )
...
@@ -193,9 +193,9 @@ bool SCH_MARKER::IsSelectStateChanged( const wxRect& aRect )
bool
previousState
=
IsSelected
();
bool
previousState
=
IsSelected
();
if
(
aRect
.
Contains
(
m_Pos
)
)
if
(
aRect
.
Contains
(
m_Pos
)
)
m_Flags
|=
SELECTED
;
SetFlags
(
SELECTED
)
;
else
else
m_Flags
&=
~
SELECTED
;
ClearFlags
(
SELECTED
)
;
return
previousState
!=
IsSelected
();
return
previousState
!=
IsSelected
();
}
}
...
...
eeschema/sch_no_connect.cpp
View file @
27ee8157
...
@@ -174,9 +174,9 @@ bool SCH_NO_CONNECT::IsSelectStateChanged( const wxRect& aRect )
...
@@ -174,9 +174,9 @@ bool SCH_NO_CONNECT::IsSelectStateChanged( const wxRect& aRect )
bool
previousState
=
IsSelected
();
bool
previousState
=
IsSelected
();
if
(
aRect
.
Contains
(
m_pos
)
)
if
(
aRect
.
Contains
(
m_pos
)
)
m_Flags
|=
SELECTED
;
SetFlags
(
SELECTED
)
;
else
else
m_Flags
&=
~
SELECTED
;
ClearFlags
(
SELECTED
)
;
return
previousState
!=
IsSelected
();
return
previousState
!=
IsSelected
();
}
}
...
...
eeschema/sch_sheet.cpp
View file @
27ee8157
...
@@ -992,9 +992,9 @@ bool SCH_SHEET::IsSelectStateChanged( const wxRect& aRect )
...
@@ -992,9 +992,9 @@ bool SCH_SHEET::IsSelectStateChanged( const wxRect& aRect )
EDA_RECT
boundingBox
=
GetBoundingBox
();
EDA_RECT
boundingBox
=
GetBoundingBox
();
if
(
aRect
.
Intersects
(
boundingBox
)
)
if
(
aRect
.
Intersects
(
boundingBox
)
)
m_Flags
|=
SELECTED
;
SetFlags
(
SELECTED
)
;
else
else
m_Flags
&=
~
SELECTED
;
ClearFlags
(
SELECTED
)
;
return
previousState
!=
IsSelected
();
return
previousState
!=
IsSelected
();
}
}
...
...
eeschema/sch_text.cpp
View file @
27ee8157
...
@@ -543,7 +543,7 @@ bool SCH_TEXT::IsDanglingStateChanged( std::vector< DANGLING_END_ITEM >& aItemLi
...
@@ -543,7 +543,7 @@ bool SCH_TEXT::IsDanglingStateChanged( std::vector< DANGLING_END_ITEM >& aItemLi
break
;
break
;
}
}
if
(
m_isDangling
==
false
)
if
(
!
m_isDangling
)
break
;
break
;
}
}
...
@@ -556,9 +556,9 @@ bool SCH_TEXT::IsSelectStateChanged( const wxRect& aRect )
...
@@ -556,9 +556,9 @@ bool SCH_TEXT::IsSelectStateChanged( const wxRect& aRect )
bool
previousState
=
IsSelected
();
bool
previousState
=
IsSelected
();
if
(
aRect
.
Contains
(
m_Pos
)
)
if
(
aRect
.
Contains
(
m_Pos
)
)
m_Flags
|=
SELECTED
;
SetFlags
(
SELECTED
)
;
else
else
m_Flags
&=
~
SELECTED
;
SetFlags
(
SELECTED
)
;
return
previousState
!=
IsSelected
();
return
previousState
!=
IsSelected
();
}
}
...
...
gerbview/class_gbr_layout.cpp
View file @
27ee8157
...
@@ -14,7 +14,7 @@ GBR_LAYOUT::GBR_LAYOUT()
...
@@ -14,7 +14,7 @@ GBR_LAYOUT::GBR_LAYOUT()
{
{
PAGE_INFO
pageInfo
(
wxT
(
"GERBER"
)
);
PAGE_INFO
pageInfo
(
wxT
(
"GERBER"
)
);
SetPageSettings
(
pageInfo
);
SetPageSettings
(
pageInfo
);
m_printLayersMask
=
-
1
;
m_printLayersMask
=
FULL_LAYERS
;
}
}
...
...
gerbview/class_gerber_draw_item.cpp
View file @
27ee8157
...
@@ -621,7 +621,7 @@ void GERBER_DRAW_ITEM::Show( int nestLevel, std::ostream& os ) const
...
@@ -621,7 +621,7 @@ void GERBER_DRAW_ITEM::Show( int nestLevel, std::ostream& os ) const
" layer=
\"
"
<<
m_Layer
<<
'"'
<<
" layer=
\"
"
<<
m_Layer
<<
'"'
<<
" size=
\"
"
<<
m_Size
<<
'"'
<<
" size=
\"
"
<<
m_Size
<<
'"'
<<
" flags=
\"
"
<<
m_Flags
<<
'"'
<<
" flags=
\"
"
<<
m_Flags
<<
'"'
<<
" status=
\"
"
<<
GetStat
e
(
-
1
)
<<
'"'
<<
" status=
\"
"
<<
GetStat
us
(
)
<<
'"'
<<
"<start"
<<
m_Start
<<
"/>"
<<
"<start"
<<
m_Start
<<
"/>"
<<
"<end"
<<
m_End
<<
"/>"
;
"<end"
<<
m_End
<<
"/>"
;
...
...
include/layers_id_colors_and_visibility.h
View file @
27ee8157
...
@@ -100,6 +100,7 @@ typedef unsigned LAYER_MSK;
...
@@ -100,6 +100,7 @@ typedef unsigned LAYER_MSK;
*/
*/
inline
LAYER_MSK
GetLayerMask
(
unsigned
aLayerNumber
)
inline
LAYER_MSK
GetLayerMask
(
unsigned
aLayerNumber
)
{
{
wxASSERT
(
aLayerNumber
<
LAYER_COUNT
&&
aLayerNumber
>=
0
);
return
1
<<
aLayerNumber
;
return
1
<<
aLayerNumber
;
}
}
...
...
pcbnew/legacy_plugin.cpp
View file @
27ee8157
...
@@ -1730,7 +1730,7 @@ void LEGACY_PLUGIN::loadPCB_LINE()
...
@@ -1730,7 +1730,7 @@ void LEGACY_PLUGIN::loadPCB_LINE()
case
4
:
case
4
:
int
state
;
int
state
;
state
=
hexParse
(
data
);
state
=
hexParse
(
data
);
dseg
->
SetState
(
state
,
ON
);
dseg
->
SetState
(
state
,
true
);
break
;
break
;
// Bezier Control Points
// Bezier Control Points
...
@@ -2046,7 +2046,7 @@ void LEGACY_PLUGIN::loadTrackList( int aStructType )
...
@@ -2046,7 +2046,7 @@ void LEGACY_PLUGIN::loadTrackList( int aStructType )
}
}
newTrack
->
SetNet
(
net_code
);
newTrack
->
SetNet
(
net_code
);
newTrack
->
SetState
(
flags
,
ON
);
newTrack
->
SetState
(
flags
,
true
);
}
}
THROW_IO_ERROR
(
"Missing '$EndTRACK'"
);
THROW_IO_ERROR
(
"Missing '$EndTRACK'"
);
...
...
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