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
675f8d4a
Commit
675f8d4a
authored
Mar 28, 2013
by
Lorenzo Marcantonio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Typedef STATUS_FLAGS to encapsulate EDA_ITEM bitmapped flags
parent
cd18ff17
Changes
30
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
71 additions
and
65 deletions
+71
-65
class_undoredo_container.cpp
common/class_undoredo_container.cpp
+2
-2
edit_bitmap.cpp
eeschema/edit_bitmap.cpp
+1
-1
getpart.cpp
eeschema/getpart.cpp
+2
-2
lib_arc.cpp
eeschema/lib_arc.cpp
+1
-1
lib_arc.h
eeschema/lib_arc.h
+1
-1
lib_circle.cpp
eeschema/lib_circle.cpp
+1
-1
lib_circle.h
eeschema/lib_circle.h
+1
-1
lib_draw_item.h
eeschema/lib_draw_item.h
+1
-1
lib_field.cpp
eeschema/lib_field.cpp
+1
-1
lib_field.h
eeschema/lib_field.h
+1
-1
lib_polyline.cpp
eeschema/lib_polyline.cpp
+1
-1
lib_polyline.h
eeschema/lib_polyline.h
+1
-1
lib_rectangle.cpp
eeschema/lib_rectangle.cpp
+1
-1
lib_rectangle.h
eeschema/lib_rectangle.h
+1
-1
lib_text.cpp
eeschema/lib_text.cpp
+1
-1
lib_text.h
eeschema/lib_text.h
+1
-1
libeditframe.cpp
eeschema/libeditframe.cpp
+1
-1
pinedit.cpp
eeschema/pinedit.cpp
+1
-1
base_struct.h
include/base_struct.h
+8
-7
class_undoredo_container.h
include/class_undoredo_container.h
+5
-5
class_track.cpp
pcbnew/class_track.cpp
+17
-17
class_track.h
pcbnew/class_track.h
+1
-1
dialog_global_deletion.cpp
pcbnew/dialogs/dialog_global_deletion.cpp
+1
-1
dragsegm.cpp
pcbnew/dragsegm.cpp
+1
-1
legacy_plugin.cpp
pcbnew/legacy_plugin.cpp
+5
-2
modedit_onclick.cpp
pcbnew/modedit_onclick.cpp
+1
-1
move_or_drag_track.cpp
pcbnew/move_or_drag_track.cpp
+3
-3
onrightclick.cpp
pcbnew/onrightclick.cpp
+1
-1
pcb_parser.cpp
pcbnew/pcb_parser.cpp
+4
-4
tr_modif.cpp
pcbnew/tr_modif.cpp
+4
-2
No files found.
common/class_undoredo_container.cpp
View file @
675f8d4a
...
...
@@ -195,7 +195,7 @@ UNDO_REDO_T PICKED_ITEMS_LIST::GetPickedItemStatus( unsigned int aIdx )
}
int
PICKED_ITEMS_LIST
::
GetPickerFlags
(
unsigned
aIdx
)
STATUS_FLAGS
PICKED_ITEMS_LIST
::
GetPickerFlags
(
unsigned
aIdx
)
{
if
(
aIdx
<
m_ItemsList
.
size
()
)
return
m_ItemsList
[
aIdx
].
GetFlags
();
...
...
@@ -253,7 +253,7 @@ bool PICKED_ITEMS_LIST::SetPickedItemStatus( UNDO_REDO_T aStatus, unsigned aIdx
}
bool
PICKED_ITEMS_LIST
::
SetPickerFlags
(
int
aFlags
,
unsigned
aIdx
)
bool
PICKED_ITEMS_LIST
::
SetPickerFlags
(
STATUS_FLAGS
aFlags
,
unsigned
aIdx
)
{
if
(
aIdx
<
m_ItemsList
.
size
()
)
{
...
...
eeschema/edit_bitmap.cpp
View file @
675f8d4a
...
...
@@ -85,7 +85,7 @@ static void moveBitmap( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosit
dirty
.
Inflate
(
4
);
// Give a margin
aPanel
->
SetMouseCapture
(
NULL
,
NULL
);
// Avoid loop in redraw panel
int
flgs
=
image
->
GetFlags
();
STATUS_FLAGS
flgs
=
image
->
GetFlags
();
image
->
ClearFlags
();
aPanel
->
RefreshDrawingRect
(
dirty
);
image
->
SetFlags
(
flgs
);
...
...
eeschema/getpart.cpp
View file @
675f8d4a
...
...
@@ -360,7 +360,7 @@ void SCH_EDIT_FRAME::OnSelectUnit( wxCommandEvent& aEvent )
if
(
unit
>
unitCount
)
unit
=
unitCount
;
int
flags
=
component
->
GetFlags
();
STATUS_FLAGS
flags
=
component
->
GetFlags
();
if
(
!
flags
)
// No command in progress: save in undo list
SaveCopyInUndoList
(
component
,
UR_CHANGED
);
...
...
@@ -405,7 +405,7 @@ void SCH_EDIT_FRAME::ConvertPart( SCH_COMPONENT* DrawComponent, wxDC* DC )
return
;
}
int
flags
=
DrawComponent
->
GetFlags
();
STATUS_FLAGS
flags
=
DrawComponent
->
GetFlags
();
if
(
DrawComponent
->
GetFlags
()
)
DrawComponent
->
Draw
(
m_canvas
,
DC
,
wxPoint
(
0
,
0
),
g_XorMode
,
g_GhostColor
);
...
...
eeschema/lib_arc.cpp
View file @
675f8d4a
...
...
@@ -574,7 +574,7 @@ wxString LIB_ARC::GetSelectMenuText() const
}
void
LIB_ARC
::
BeginEdit
(
int
aEditMode
,
const
wxPoint
aPosition
)
void
LIB_ARC
::
BeginEdit
(
STATUS_FLAGS
aEditMode
,
const
wxPoint
aPosition
)
{
wxCHECK_RET
(
(
aEditMode
&
(
IS_NEW
|
IS_MOVED
|
IS_RESIZED
)
)
!=
0
,
wxT
(
"Invalid edit mode for LIB_ARC object."
)
);
...
...
eeschema/lib_arc.h
View file @
675f8d4a
...
...
@@ -110,7 +110,7 @@ public:
int
GetPenSize
()
const
;
void
BeginEdit
(
int
aEditMode
,
const
wxPoint
aStartPoint
=
wxPoint
(
0
,
0
)
);
void
BeginEdit
(
STATUS_FLAGS
aEditMode
,
const
wxPoint
aStartPoint
=
wxPoint
(
0
,
0
)
);
bool
ContinueEdit
(
const
wxPoint
aNextPoint
);
...
...
eeschema/lib_circle.cpp
View file @
675f8d4a
...
...
@@ -296,7 +296,7 @@ wxString LIB_CIRCLE::GetSelectMenuText() const
}
void
LIB_CIRCLE
::
BeginEdit
(
int
aEditMode
,
const
wxPoint
aPosition
)
void
LIB_CIRCLE
::
BeginEdit
(
STATUS_FLAGS
aEditMode
,
const
wxPoint
aPosition
)
{
wxCHECK_RET
(
(
aEditMode
&
(
IS_NEW
|
IS_MOVED
|
IS_RESIZED
)
)
!=
0
,
wxT
(
"Invalid edit mode for LIB_CIRCLE object."
)
);
...
...
eeschema/lib_circle.h
View file @
675f8d4a
...
...
@@ -71,7 +71,7 @@ public:
void
GetMsgPanelInfo
(
std
::
vector
<
MSG_PANEL_ITEM
>&
aList
);
void
BeginEdit
(
int
aEditMode
,
const
wxPoint
aStartPoint
=
wxPoint
(
0
,
0
)
);
void
BeginEdit
(
STATUS_FLAGS
aEditMode
,
const
wxPoint
aStartPoint
=
wxPoint
(
0
,
0
)
);
bool
ContinueEdit
(
const
wxPoint
aNextPoint
);
...
...
eeschema/lib_draw_item.h
View file @
675f8d4a
...
...
@@ -175,7 +175,7 @@ public:
* started. This may or may not be required depending on the item
* being edited and the edit mode.
*/
virtual
void
BeginEdit
(
int
aEditMode
,
const
wxPoint
aPosition
=
wxPoint
(
0
,
0
)
)
{}
virtual
void
BeginEdit
(
STATUS_FLAGS
aEditMode
,
const
wxPoint
aPosition
=
wxPoint
(
0
,
0
)
)
{}
/**
* Continue an edit in progress at \a aPosition.
...
...
eeschema/lib_field.cpp
View file @
675f8d4a
...
...
@@ -659,7 +659,7 @@ wxString LIB_FIELD::GetSelectMenuText() const
}
void
LIB_FIELD
::
BeginEdit
(
int
aEditMode
,
const
wxPoint
aPosition
)
void
LIB_FIELD
::
BeginEdit
(
STATUS_FLAGS
aEditMode
,
const
wxPoint
aPosition
)
{
wxCHECK_RET
(
(
aEditMode
&
(
IS_NEW
|
IS_MOVED
)
)
!=
0
,
wxT
(
"Invalid edit mode for LIB_FIELD object."
)
);
...
...
eeschema/lib_field.h
View file @
675f8d4a
...
...
@@ -207,7 +207,7 @@ public:
EDA_COLOR_T
GetDefaultColor
();
void
BeginEdit
(
int
aEditMode
,
const
wxPoint
aStartPoint
=
wxPoint
(
0
,
0
)
);
void
BeginEdit
(
STATUS_FLAGS
aEditMode
,
const
wxPoint
aStartPoint
=
wxPoint
(
0
,
0
)
);
bool
ContinueEdit
(
const
wxPoint
aNextPoint
);
...
...
eeschema/lib_polyline.cpp
View file @
675f8d4a
...
...
@@ -420,7 +420,7 @@ wxString LIB_POLYLINE::GetSelectMenuText() const
}
void
LIB_POLYLINE
::
BeginEdit
(
int
aEditMode
,
const
wxPoint
aPosition
)
void
LIB_POLYLINE
::
BeginEdit
(
STATUS_FLAGS
aEditMode
,
const
wxPoint
aPosition
)
{
wxCHECK_RET
(
(
aEditMode
&
(
IS_NEW
|
IS_MOVED
|
IS_RESIZED
)
)
!=
0
,
wxT
(
"Invalid edit mode for LIB_POLYLINE object."
)
);
...
...
eeschema/lib_polyline.h
View file @
675f8d4a
...
...
@@ -84,7 +84,7 @@ public:
void
GetMsgPanelInfo
(
std
::
vector
<
MSG_PANEL_ITEM
>&
aList
);
void
BeginEdit
(
int
aEditMode
,
const
wxPoint
aStartPoint
=
wxPoint
(
0
,
0
)
);
void
BeginEdit
(
STATUS_FLAGS
aEditMode
,
const
wxPoint
aStartPoint
=
wxPoint
(
0
,
0
)
);
bool
ContinueEdit
(
const
wxPoint
aNextPoint
);
...
...
eeschema/lib_rectangle.cpp
View file @
675f8d4a
...
...
@@ -333,7 +333,7 @@ wxString LIB_RECTANGLE::GetSelectMenuText() const
}
void
LIB_RECTANGLE
::
BeginEdit
(
int
aEditMode
,
const
wxPoint
aPosition
)
void
LIB_RECTANGLE
::
BeginEdit
(
STATUS_FLAGS
aEditMode
,
const
wxPoint
aPosition
)
{
wxCHECK_RET
(
(
aEditMode
&
(
IS_NEW
|
IS_MOVED
|
IS_RESIZED
)
)
!=
0
,
wxT
(
"Invalid edit mode for LIB_RECTANGLE object."
)
);
...
...
eeschema/lib_rectangle.h
View file @
675f8d4a
...
...
@@ -75,7 +75,7 @@ public:
void
GetMsgPanelInfo
(
std
::
vector
<
MSG_PANEL_ITEM
>&
aList
);
void
BeginEdit
(
int
aEditMode
,
const
wxPoint
aStartPoint
=
wxPoint
(
0
,
0
)
);
void
BeginEdit
(
STATUS_FLAGS
aEditMode
,
const
wxPoint
aStartPoint
=
wxPoint
(
0
,
0
)
);
bool
ContinueEdit
(
const
wxPoint
aNextPoint
);
...
...
eeschema/lib_text.cpp
View file @
675f8d4a
...
...
@@ -495,7 +495,7 @@ wxString LIB_TEXT::GetSelectMenuText() const
}
void
LIB_TEXT
::
BeginEdit
(
int
aEditMode
,
const
wxPoint
aPosition
)
void
LIB_TEXT
::
BeginEdit
(
STATUS_FLAGS
aEditMode
,
const
wxPoint
aPosition
)
{
wxCHECK_RET
(
(
aEditMode
&
(
IS_NEW
|
IS_MOVED
)
)
!=
0
,
wxT
(
"Invalid edit mode for LIB_TEXT object."
)
);
...
...
eeschema/lib_text.h
View file @
675f8d4a
...
...
@@ -100,7 +100,7 @@ public:
void
Rotate
();
void
BeginEdit
(
int
aEditMode
,
const
wxPoint
aStartPoint
=
wxPoint
(
0
,
0
)
);
void
BeginEdit
(
STATUS_FLAGS
aEditMode
,
const
wxPoint
aStartPoint
=
wxPoint
(
0
,
0
)
);
bool
ContinueEdit
(
const
wxPoint
aNextPoint
);
...
...
eeschema/libeditframe.cpp
View file @
675f8d4a
...
...
@@ -754,7 +754,7 @@ void LIB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
break
;
m_canvas
->
MoveCursorToCrossHair
();
int
oldFlags
=
m_drawItem
->
GetFlags
();
STATUS_FLAGS
oldFlags
=
m_drawItem
->
GetFlags
();
m_drawItem
->
ClearFlags
();
m_drawItem
->
Draw
(
m_canvas
,
&
dc
,
wxPoint
(
0
,
0
),
UNSPECIFIED_COLOR
,
g_XorMode
,
NULL
,
DefaultTransform
);
(
(
LIB_POLYLINE
*
)
m_drawItem
)
->
DeleteSegment
(
GetScreen
()
->
GetCrossHairPosition
(
true
)
);
...
...
eeschema/pinedit.cpp
View file @
675f8d4a
...
...
@@ -72,7 +72,7 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event )
if
(
m_drawItem
==
NULL
||
m_drawItem
->
Type
()
!=
LIB_PIN_T
)
return
;
int
item_flags
=
m_drawItem
->
GetFlags
();
// save flags to restore them after editing
STATUS_FLAGS
item_flags
=
m_drawItem
->
GetFlags
();
// save flags to restore them after editing
LIB_PIN
*
pin
=
(
LIB_PIN
*
)
m_drawItem
;
DIALOG_LIB_EDIT_PIN
dlg
(
this
,
pin
);
...
...
include/base_struct.h
View file @
675f8d4a
...
...
@@ -383,6 +383,7 @@ public:
///< already been edited, in some functions
#define EDA_ITEM_ALL_FLAGS -1
typedef
unsigned
STATUS_FLAGS
;
/**
* Class EDA_ITEM
...
...
@@ -399,7 +400,7 @@ private:
* functions.
*/
KICAD_T
m_StructType
;
int
m_Status
;
STATUS_FLAGS
m_Status
;
protected
:
EDA_ITEM
*
Pnext
;
///< next in linked list
...
...
@@ -414,7 +415,7 @@ protected:
bool
m_forceVisible
;
/// Flag bits for editing and other uses.
int
m_Flags
;
STATUS_FLAGS
m_Flags
;
// Link to an copy of the item use to save the item's state for undo/redo feature.
EDA_ITEM
*
m_Image
;
...
...
@@ -475,12 +476,12 @@ public:
m_Status
&=
~
type
;
}
int
GetStatus
()
const
{
return
m_Status
;
}
void
SetStatus
(
int
aStatus
)
{
m_Status
=
aStatus
;
}
STATUS_FLAGS
GetStatus
()
const
{
return
m_Status
;
}
void
SetStatus
(
STATUS_FLAGS
aStatus
)
{
m_Status
=
aStatus
;
}
void
SetFlags
(
int
aMask
)
{
m_Flags
|=
aMask
;
}
void
ClearFlags
(
int
aMask
=
EDA_ITEM_ALL_FLAGS
)
{
m_Flags
&=
~
aMask
;
}
int
GetFlags
()
const
{
return
m_Flags
;
}
void
SetFlags
(
STATUS_FLAGS
aMask
)
{
m_Flags
|=
aMask
;
}
void
ClearFlags
(
STATUS_FLAGS
aMask
=
EDA_ITEM_ALL_FLAGS
)
{
m_Flags
&=
~
aMask
;
}
STATUS_FLAGS
GetFlags
()
const
{
return
m_Flags
;
}
void
SetImage
(
EDA_ITEM
*
aItem
)
{
m_Image
=
aItem
;
}
...
...
include/class_undoredo_container.h
View file @
675f8d4a
...
...
@@ -81,7 +81,7 @@ enum UNDO_REDO_T {
class
ITEM_PICKER
{
private
:
int
m_pickerFlags
;
/* a copy of m_Flags member. useful in mode/drag
STATUS_FLAGS
m_pickerFlags
;
/* a copy of m_Flags member. useful in mode/drag
* undo/redo commands */
UNDO_REDO_T
m_undoRedoStatus
;
/* type of operation to undo/redo for this item */
EDA_ITEM
*
m_pickedItem
;
/* Pointer on the schematic or board item that is concerned
...
...
@@ -113,9 +113,9 @@ public:
UNDO_REDO_T
GetStatus
()
{
return
m_undoRedoStatus
;
}
void
SetFlags
(
int
aFlags
)
{
m_pickerFlags
=
aFlags
;
}
void
SetFlags
(
STATUS_FLAGS
aFlags
)
{
m_pickerFlags
=
aFlags
;
}
int
GetFlags
()
{
return
m_pickerFlags
;
}
STATUS_FLAGS
GetFlags
()
const
{
return
m_pickerFlags
;
}
void
SetLink
(
EDA_ITEM
*
aItem
)
{
m_link
=
aItem
;
}
...
...
@@ -231,7 +231,7 @@ public:
* @param aIdx Index of the picker in the picked list
* @return The value stored in the picker, if the picker exists, or 0 if does not exist
*/
int
GetPickerFlags
(
unsigned
aIdx
);
STATUS_FLAGS
GetPickerFlags
(
unsigned
aIdx
);
/**
* Function SetPickedItem
...
...
@@ -275,7 +275,7 @@ public:
* @param aIdx Index of the picker in the picked list
* @return True if the picker exists or false if does not exist
*/
bool
SetPickerFlags
(
int
aFlags
,
unsigned
aIdx
);
bool
SetPickerFlags
(
STATUS_FLAGS
aFlags
,
unsigned
aIdx
);
/**
* Function RemovePicker
...
...
pcbnew/class_track.cpp
View file @
675f8d4a
...
...
@@ -273,9 +273,9 @@ bool TRACK::IsNull()
}
int
TRACK
::
IsPointOnEnds
(
const
wxPoint
&
point
,
int
min_dist
)
STATUS_FLAGS
TRACK
::
IsPointOnEnds
(
const
wxPoint
&
point
,
int
min_dist
)
{
int
result
=
0
;
STATUS_FLAGS
result
=
0
;
if
(
min_dist
<
0
)
min_dist
=
m_Width
/
2
;
...
...
@@ -1408,15 +1408,15 @@ int TRACK::GetEndSegments( int aCount, TRACK** aStartTrace, TRACK** aEndTrace )
if
(
via
)
{
layerMask
|=
via
->
ReturnMaskLayer
();
via
->
SetState
(
BUSY
,
ON
);
via
->
SetState
(
BUSY
,
true
);
}
Track
->
SetState
(
BUSY
,
ON
);
Track
->
SetState
(
BUSY
,
true
);
segm
=
::
GetTrace
(
this
,
TrackListEnd
,
Track
->
m_Start
,
layerMask
);
Track
->
SetState
(
BUSY
,
OFF
);
Track
->
SetState
(
BUSY
,
false
);
if
(
via
)
via
->
SetState
(
BUSY
,
OFF
);
via
->
SetState
(
BUSY
,
false
);
if
(
segm
==
NULL
)
{
...
...
@@ -1434,13 +1434,13 @@ int TRACK::GetEndSegments( int aCount, TRACK** aStartTrace, TRACK** aEndTrace )
BeginPad
=
Track
->
GetState
(
BEGIN_ONPAD
);
EndPad
=
Track
->
GetState
(
END_ONPAD
);
Track
->
SetState
(
BEGIN_ONPAD
|
END_ONPAD
,
OFF
);
Track
->
SetState
(
BEGIN_ONPAD
|
END_ONPAD
,
false
);
if
(
BeginPad
)
Track
->
SetState
(
END_ONPAD
,
ON
);
Track
->
SetState
(
END_ONPAD
,
true
);
if
(
EndPad
)
Track
->
SetState
(
BEGIN_ONPAD
,
ON
);
Track
->
SetState
(
BEGIN_ONPAD
,
true
);
EXCHG
(
Track
->
m_Start
,
Track
->
m_End
);
EXCHG
(
Track
->
start
,
Track
->
end
);
...
...
@@ -1455,15 +1455,15 @@ int TRACK::GetEndSegments( int aCount, TRACK** aStartTrace, TRACK** aEndTrace )
if
(
via
)
{
layerMask
|=
via
->
ReturnMaskLayer
();
via
->
SetState
(
BUSY
,
ON
);
via
->
SetState
(
BUSY
,
true
);
}
Track
->
SetState
(
BUSY
,
ON
);
Track
->
SetState
(
BUSY
,
true
);
segm
=
::
GetTrace
(
this
,
TrackListEnd
,
Track
->
m_End
,
layerMask
);
Track
->
SetState
(
BUSY
,
OFF
);
Track
->
SetState
(
BUSY
,
false
);
if
(
via
)
via
->
SetState
(
BUSY
,
OFF
);
via
->
SetState
(
BUSY
,
false
);
if
(
segm
==
NULL
)
{
...
...
@@ -1478,13 +1478,13 @@ int TRACK::GetEndSegments( int aCount, TRACK** aStartTrace, TRACK** aEndTrace )
BeginPad
=
Track
->
GetState
(
BEGIN_ONPAD
);
EndPad
=
Track
->
GetState
(
END_ONPAD
);
Track
->
SetState
(
BEGIN_ONPAD
|
END_ONPAD
,
OFF
);
Track
->
SetState
(
BEGIN_ONPAD
|
END_ONPAD
,
false
);
if
(
BeginPad
)
Track
->
SetState
(
END_ONPAD
,
ON
);
Track
->
SetState
(
END_ONPAD
,
true
);
if
(
EndPad
)
Track
->
SetState
(
BEGIN_ONPAD
,
ON
);
Track
->
SetState
(
BEGIN_ONPAD
,
true
);
EXCHG
(
Track
->
m_Start
,
Track
->
m_End
);
EXCHG
(
Track
->
start
,
Track
->
end
);
...
...
@@ -1543,7 +1543,7 @@ void TRACK::Show( int nestLevel, std::ostream& os ) const
" layer=
\"
"
<<
m_Layer
<<
'"'
<<
" width=
\"
"
<<
m_Width
<<
'"'
<<
" flags=
\"
"
<<
m_Flags
<<
'"'
<<
" status=
\"
"
<<
GetStat
e
(
-
1
)
<<
'"'
<<
" status=
\"
"
<<
GetStat
us
(
)
<<
'"'
<<
// " drill=\"" << GetDrillValue() << '"' <<
" netcode=
\"
"
<<
GetNet
()
<<
"
\"
>"
<<
...
...
pcbnew/class_track.h
View file @
675f8d4a
...
...
@@ -229,7 +229,7 @@ public:
* (dist = min_dist) both ends, or 0 if none of the above.
* if min_dist < 0: min_dist = track_width/2
*/
int
IsPointOnEnds
(
const
wxPoint
&
point
,
int
min_dist
=
0
);
STATUS_FLAGS
IsPointOnEnds
(
const
wxPoint
&
point
,
int
min_dist
=
0
);
/**
* Function IsNull
...
...
pcbnew/dialogs/dialog_global_deletion.cpp
View file @
675f8d4a
...
...
@@ -139,7 +139,7 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete( )
if
(
m_DelTracks
->
GetValue
()
)
{
int
track_mask_filter
=
0
;
STATUS_FLAGS
track_mask_filter
=
0
;
if
(
!
m_TrackFilterLocked
->
GetValue
()
)
track_mask_filter
|=
TRACK_LOCKED
;
...
...
pcbnew/dragsegm.cpp
View file @
675f8d4a
...
...
@@ -350,7 +350,7 @@ void Collect_TrackSegmentsToDrag( BOARD* aPcb, const wxPoint& aRefPos, int aLaye
if
(
track
->
IsDragging
()
)
continue
;
// already put in list
int
flag
=
0
;
STATUS_FLAGS
flag
=
0
;
int
maxdist
=
std
::
max
(
aMaxDist
,
track
->
GetWidth
()
/
2
);
if
(
(
track
->
GetFlags
()
&
STARTPOINT
)
==
0
)
...
...
pcbnew/legacy_plugin.cpp
View file @
675f8d4a
...
...
@@ -1990,11 +1990,14 @@ void LEGACY_PLUGIN::loadTrackList( int aStructType )
int
makeType
;
time_t
timeStamp
;
int
layer
,
type
,
flags
,
net_code
;
int
layer
,
type
,
net_code
,
flags_int
;
// parse the 2nd line to determine the type of object
// e.g. "De 15 1 7 0 0" for a via
sscanf
(
line
+
SZ
(
"De"
),
" %d %d %d %lX %X"
,
&
layer
,
&
type
,
&
net_code
,
&
timeStamp
,
&
flags
);
sscanf
(
line
+
SZ
(
"De"
),
" %d %d %d %lX %X"
,
&
layer
,
&
type
,
&
net_code
,
&
timeStamp
,
&
flags_int
);
STATUS_FLAGS
flags
;
flags
=
static_cast
<
STATUS_FLAGS
>
(
flags_int
);
if
(
aStructType
==
PCB_TRACE_T
&&
type
==
1
)
makeType
=
PCB_VIA_T
;
...
...
pcbnew/modedit_onclick.cpp
View file @
675f8d4a
...
...
@@ -253,7 +253,7 @@ bool FOOTPRINT_EDIT_FRAME::OnRightClick( const wxPoint& MousePos, wxMenu* PopMen
if
(
item
)
{
int
flags
=
item
->
GetFlags
();
STATUS_FLAGS
flags
=
item
->
GetFlags
();
switch
(
item
->
Type
()
)
{
case
PCB_MODULE_T
:
...
...
pcbnew/move_or_drag_track.cpp
View file @
675f8d4a
...
...
@@ -637,7 +637,7 @@ void PCB_EDIT_FRAME::StartMoveOneNodeOrSegment( TRACK* aTrack, wxDC* aDC, int aC
}
else
{
int
diag
=
aTrack
->
IsPointOnEnds
(
GetScreen
()
->
GetCrossHairPosition
(),
-
1
);
STATUS_FLAGS
diag
=
aTrack
->
IsPointOnEnds
(
GetScreen
()
->
GetCrossHairPosition
(),
-
1
);
wxPoint
pos
;
switch
(
aCommand
)
...
...
@@ -766,7 +766,7 @@ void PCB_EDIT_FRAME::Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC
if
(
TrackToStartPoint
)
{
int
flag
=
STARTPOINT
;
STATUS_FLAGS
flag
=
STARTPOINT
;
if
(
track
->
GetStart
()
!=
TrackToStartPoint
->
GetStart
()
)
flag
=
ENDPOINT
;
...
...
@@ -777,7 +777,7 @@ void PCB_EDIT_FRAME::Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC
if
(
TrackToEndPoint
)
{
int
flag
=
STARTPOINT
;
STATUS_FLAGS
flag
=
STARTPOINT
;
if
(
track
->
GetEnd
()
!=
TrackToEndPoint
->
GetStart
()
)
flag
=
ENDPOINT
;
...
...
pcbnew/onrightclick.cpp
View file @
675f8d4a
...
...
@@ -53,7 +53,7 @@ static wxMenu* Append_Track_Width_List( BOARD* aBoard );
bool
PCB_EDIT_FRAME
::
OnRightClick
(
const
wxPoint
&
aMousePos
,
wxMenu
*
aPopMenu
)
{
wxString
msg
;
int
flags
=
0
;
STATUS_FLAGS
flags
=
0
;
bool
locate_track
=
false
;
bool
blockActive
=
!
GetScreen
()
->
m_BlockLocate
.
IsIdle
();
...
...
pcbnew/pcb_parser.cpp
View file @
675f8d4a
...
...
@@ -1282,7 +1282,7 @@ DRAWSEGMENT* PCB_PARSER::parseDRAWSEGMENT() throw( IO_ERROR, PARSE_ERROR )
break
;
case
T_status
:
segment
->
SetStatus
(
parseHex
(
)
);
segment
->
SetStatus
(
static_cast
<
STATUS_FLAGS
>
(
parseHex
()
)
);
break
;
default
:
...
...
@@ -1966,7 +1966,7 @@ EDGE_MODULE* PCB_PARSER::parseEDGE_MODULE() throw( IO_ERROR, PARSE_ERROR )
break
;
case
T_status
:
segment
->
SetStatus
(
parseHex
(
)
);
segment
->
SetStatus
(
static_cast
<
STATUS_FLAGS
>
(
parseHex
()
)
);
break
;
default
:
...
...
@@ -2263,7 +2263,7 @@ TRACK* PCB_PARSER::parseTRACK() throw( IO_ERROR, PARSE_ERROR )
break
;
case
T_status
:
track
->
SetStatus
(
parseHex
(
)
);
track
->
SetStatus
(
static_cast
<
STATUS_FLAGS
>
(
parseHex
()
)
);
break
;
default
:
...
...
@@ -2343,7 +2343,7 @@ SEGVIA* PCB_PARSER::parseSEGVIA() throw( IO_ERROR, PARSE_ERROR )
break
;
case
T_status
:
via
->
SetStatus
(
parseHex
(
)
);
via
->
SetStatus
(
static_cast
<
STATUS_FLAGS
>
(
parseHex
()
)
);
NeedRIGHT
();
break
;
...
...
pcbnew/tr_modif.cpp
View file @
675f8d4a
...
...
@@ -41,7 +41,8 @@
#include <protos.h>
static
void
ListSetState
(
EDA_ITEM
*
Start
,
int
NbItem
,
int
State
,
int
onoff
);
static
void
ListSetState
(
EDA_ITEM
*
Start
,
int
NbItem
,
STATUS_FLAGS
State
,
bool
onoff
);
void
DrawTraces
(
EDA_DRAW_PANEL
*
panel
,
wxDC
*
DC
,
TRACK
*
aTrackList
,
int
nbsegment
,
...
...
@@ -311,7 +312,8 @@ int PCB_EDIT_FRAME::EraseRedundantTrack( wxDC* aDC,
/* Set the bits of .m_State member to on/off value, using bit mask State
* of a list of EDA_ITEM
*/
static
void
ListSetState
(
EDA_ITEM
*
Start
,
int
NbItem
,
int
State
,
int
onoff
)
static
void
ListSetState
(
EDA_ITEM
*
Start
,
int
NbItem
,
STATUS_FLAGS
State
,
bool
onoff
)
{
for
(
;
(
Start
!=
NULL
)
&&
(
NbItem
>
0
);
NbItem
--
,
Start
=
Start
->
Next
()
)
{
...
...
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