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
6769e4c9
Commit
6769e4c9
authored
Dec 21, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code cleaning and fixed a TODO remark in EDA_BoardDesignSettings::SetEnabledLayers( int aMask )
parent
b275d34d
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
100 additions
and
76 deletions
+100
-76
block_commande.cpp
common/block_commande.cpp
+2
-2
copy_to_clipboard.cpp
common/copy_to_clipboard.cpp
+1
-1
drawpanel.cpp
common/drawpanel.cpp
+0
-5
class_sch_component.cpp
eeschema/class_sch_component.cpp
+1
-1
libeditfrm.h
eeschema/libeditfrm.h
+1
-1
libviewfrm.h
eeschema/libviewfrm.h
+7
-7
operations_on_items_lists.cpp
eeschema/operations_on_items_lists.cpp
+2
-2
symbdraw.cpp
eeschema/symbdraw.cpp
+1
-1
viewlibs.cpp
eeschema/viewlibs.cpp
+1
-2
class_board_design_settings.h
include/class_board_design_settings.h
+1
-8
class_drawpanel.h
include/class_drawpanel.h
+17
-14
pcbstruct.h
include/pcbstruct.h
+2
-0
class_board_design_settings.cpp
pcbnew/class_board_design_settings.cpp
+29
-2
class_edge_mod.cpp
pcbnew/class_edge_mod.cpp
+2
-2
class_pad_draw_functions.cpp
pcbnew/class_pad_draw_functions.cpp
+1
-1
class_text_mod.cpp
pcbnew/class_text_mod.cpp
+1
-1
class_track.cpp
pcbnew/class_track.cpp
+1
-1
cotation.cpp
pcbnew/cotation.cpp
+1
-1
dialog_layers_setup.cpp
pcbnew/dialog_layers_setup.cpp
+5
-0
dragsegm.cpp
pcbnew/dragsegm.cpp
+2
-2
edit_pcb_text.cpp
pcbnew/edit_pcb_text.cpp
+1
-1
editedge.cpp
pcbnew/editedge.cpp
+1
-1
editrack.cpp
pcbnew/editrack.cpp
+3
-3
mirepcb.cpp
pcbnew/mirepcb.cpp
+1
-1
modules.cpp
pcbnew/modules.cpp
+3
-3
move_or_drag_track.cpp
pcbnew/move_or_drag_track.cpp
+5
-5
print_board_functions.cpp
pcbnew/print_board_functions.cpp
+3
-3
tracemod.cpp
pcbnew/tracemod.cpp
+1
-1
zones_by_polygon.cpp
pcbnew/zones_by_polygon.cpp
+4
-4
No files found.
common/block_commande.cpp
View file @
6769e4c9
...
...
@@ -287,8 +287,8 @@ void AbortBlockCurrentCommand( WinEDA_DrawPanel* Panel, wxDC* DC )
screen
->
m_BlockLocate
.
m_State
=
STATE_NO_BLOCK
;
screen
->
m_BlockLocate
.
m_Command
=
BLOCK_ABORT
;
Panel
->
m_Parent
->
HandleBlockEnd
(
DC
);
Panel
->
GetParent
()
->
HandleBlockEnd
(
DC
);
screen
->
m_BlockLocate
.
m_Command
=
BLOCK_IDLE
;
Panel
->
m_Parent
->
DisplayToolMsg
(
wxEmptyString
);
Panel
->
GetParent
()
->
DisplayToolMsg
(
wxEmptyString
);
}
common/copy_to_clipboard.cpp
View file @
6769e4c9
...
...
@@ -61,7 +61,7 @@ bool DrawPage( WinEDA_DrawPanel* panel )
BASE_SCREEN
*
screen
=
panel
->
GetScreen
();
/* scale is the ratio resolution/internal units */
float
scale
=
82.0
/
panel
->
m_Parent
->
m_InternalUnits
;
float
scale
=
82.0
/
panel
->
GetParent
()
->
m_InternalUnits
;
if
(
ActiveScreen
->
m_BlockLocate
.
m_Command
!=
BLOCK_IDLE
)
{
...
...
common/drawpanel.cpp
View file @
6769e4c9
...
...
@@ -103,8 +103,6 @@ WinEDA_DrawPanel::WinEDA_DrawPanel( WinEDA_DrawFrame* parent, int id,
WinEDA_DrawPanel
::~
WinEDA_DrawPanel
()
{
wxASSERT
(
wxGetApp
().
m_EDA_Config
!=
NULL
);
wxGetApp
().
m_EDA_Config
->
Write
(
wxT
(
"AutoPAN"
),
m_AutoPAN_Enable
);
}
...
...
@@ -112,9 +110,6 @@ WinEDA_DrawPanel::~WinEDA_DrawPanel()
BASE_SCREEN
*
WinEDA_DrawPanel
::
GetScreen
()
{
WinEDA_DrawFrame
*
parentFrame
=
m_Parent
;
wxASSERT
(
parentFrame
);
return
parentFrame
->
GetBaseScreen
();
}
...
...
eeschema/class_sch_component.cpp
View file @
6769e4c9
...
...
@@ -578,7 +578,7 @@ EDA_Rect SCH_COMPONENT::GetBoundaryBox() const
}
/* Used i
f
undo / redo command:
/* Used i
n
undo / redo command:
* swap data between this and copyitem
*/
void
SCH_COMPONENT
::
SwapData
(
SCH_COMPONENT
*
copyitem
)
...
...
eeschema/libeditfrm.h
View file @
6769e4c9
...
...
@@ -102,7 +102,7 @@ public:
void
SetConvert
(
int
convert
)
{
wxASSERT
(
convert
>=
1
);
wxASSERT
(
convert
>=
0
);
m_convert
=
convert
;
}
...
...
eeschema/libviewfrm.h
View file @
6769e4c9
...
...
@@ -29,6 +29,13 @@ private:
wxSemaphore
*
m_Semaphore
;
// != NULL if the frame must emulate a modal dialog
wxString
m_ConfigPath
;
// subpath for configuration
protected
:
static
wxString
m_libraryName
;
static
wxString
m_entryName
;
static
int
m_unit
;
static
int
m_convert
;
static
wxSize
m_clientSize
;
public
:
WinEDA_ViewlibFrame
(
wxWindow
*
father
,
CMP_LIBRARY
*
Library
=
NULL
,
...
...
@@ -71,13 +78,6 @@ private:
void
ViewOneLibraryContent
(
CMP_LIBRARY
*
Lib
,
int
Flag
);
bool
OnRightClick
(
const
wxPoint
&
MousePos
,
wxMenu
*
PopMenu
);
protected
:
static
wxString
m_libraryName
;
static
wxString
m_entryName
;
static
int
m_unit
;
static
int
m_convert
;
static
wxSize
m_clientSize
;
DECLARE_EVENT_TABLE
()
};
...
...
eeschema/operations_on_items_lists.cpp
View file @
6769e4c9
...
...
@@ -56,7 +56,7 @@ void MoveItemsInList( PICKED_ITEMS_LIST& aItemsList, const wxPoint aMoveVector )
void
DeleteItemsInList
(
WinEDA_DrawPanel
*
panel
,
PICKED_ITEMS_LIST
&
aItemsList
)
{
SCH_SCREEN
*
screen
=
(
SCH_SCREEN
*
)
panel
->
GetScreen
();
WinEDA_SchematicFrame
*
frame
=
(
WinEDA_SchematicFrame
*
)
panel
->
m_Parent
;
WinEDA_SchematicFrame
*
frame
=
(
WinEDA_SchematicFrame
*
)
panel
->
GetParent
()
;
PICKED_ITEMS_LIST
itemsList
;
ITEM_PICKER
itemWrapper
;
...
...
@@ -99,7 +99,7 @@ DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE" ) );
void
DeleteStruct
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
SCH_ITEM
*
DrawStruct
)
{
SCH_SCREEN
*
screen
=
(
SCH_SCREEN
*
)
panel
->
GetScreen
();
WinEDA_SchematicFrame
*
frame
=
(
WinEDA_SchematicFrame
*
)
panel
->
m_Parent
;
WinEDA_SchematicFrame
*
frame
=
(
WinEDA_SchematicFrame
*
)
panel
->
GetParent
()
;
if
(
!
DrawStruct
)
return
;
...
...
eeschema/symbdraw.cpp
View file @
6769e4c9
...
...
@@ -113,7 +113,7 @@ static void AbortSymbolTraceOn( WinEDA_DrawPanel* Panel, wxDC* DC )
if
(
item
->
m_Flags
&
IS_NEW
)
{
if
(
item
->
Type
()
==
COMPONENT_ARC_DRAW_TYPE
)
Panel
->
m_Parent
->
RedrawActiveWindow
(
DC
,
TRUE
);
Panel
->
GetParent
()
->
RedrawActiveWindow
(
DC
,
TRUE
);
else
item
->
Draw
(
Panel
,
DC
,
wxPoint
(
0
,
0
),
-
1
,
g_XorMode
,
NULL
,
DefaultTransformMatrix
);
...
...
eeschema/viewlibs.cpp
View file @
6769e4c9
...
...
@@ -204,8 +204,7 @@ void WinEDA_ViewlibFrame::ViewOneLibraryContent( CMP_LIBRARY* Lib, int Flag )
if
(
Flag
==
NEW_PART
)
{
DisplayComponentsNamesInLib
(
this
,
Lib
,
CmpName
,
m_entryName
);
DisplayComponentsNamesInLib
(
this
,
Lib
,
CmpName
,
m_entryName
);
}
if
(
Flag
==
NEXT_PART
)
...
...
include/class_board_design_settings.h
View file @
6769e4c9
...
...
@@ -148,14 +148,7 @@ public:
* changes the bit-mask of enabled layers
* @param aMask = The new bit-mask of enabled layers
*/
void
SetEnabledLayers
(
int
aMask
)
{
// TODO; ensure consistency with m_CopperLayerCount
m_EnabledLayers
=
aMask
;
// A disabled layer cannot be visible
m_VisibleLayers
&=
aMask
;
}
void
SetEnabledLayers
(
int
aMask
);
/**
...
...
include/class_drawpanel.h
View file @
6769e4c9
...
...
@@ -16,8 +16,10 @@ class PCB_SCREEN;
class
WinEDA_DrawPanel
:
public
wxScrolledWindow
{
p
ublic
:
p
rivate
:
WinEDA_DrawFrame
*
m_Parent
;
public
:
EDA_Rect
m_ClipBox
;
// the clipbox used in screen
// redraw (usually gives the
// visible area in internal units)
...
...
@@ -74,12 +76,13 @@ public:
BASE_SCREEN
*
GetScreen
();
WinEDA_DrawFrame
*
GetParent
()
{
return
m_Parent
;
}
bool
IsPointOnDisplay
(
wxPoint
ref_pos
);
void
OnPaint
(
wxPaintEvent
&
event
);
void
OnSize
(
wxSizeEvent
&
event
);
void
SetBoundaryBox
();
void
ReDraw
(
wxDC
*
DC
,
bool
erasebg
=
TRUE
);
void
PrintPage
(
wxDC
*
DC
,
bool
Print_Sheet_Ref
,
int
PrintMask
,
...
...
@@ -110,6 +113,10 @@ public:
bool
OnRightClick
(
wxMouseEvent
&
event
);
void
Process_Special_Functions
(
wxCommandEvent
&
event
);
bool
IsPointOnDisplay
(
wxPoint
ref_pos
);
void
SetBoundaryBox
();
void
ReDraw
(
wxDC
*
DC
,
bool
erasebg
=
TRUE
);
/** Function CursorRealPosition
* @return the position in user units of location ScreenPos
* @param ScreenPos = the screen (in pixel) position to convert
...
...
@@ -157,16 +164,12 @@ public:
void
MouseTo
(
const
wxPoint
&
Mouse
);
/* Cursor functions */
void
Trace_Curseur
(
wxDC
*
DC
,
int
color
=
WHITE
);
// Draw the
// user cursor
// (grid
// cursor)
void
CursorOff
(
wxDC
*
DC
);
// remove the
// grid cursor
// from the
// display
void
CursorOn
(
wxDC
*
DC
);
// display the
// grid cursor
// Draw the user cursor (grid cursor)
void
Trace_Curseur
(
wxDC
*
DC
,
int
color
=
WHITE
);
// remove the grid cursor from the display
void
CursorOff
(
wxDC
*
DC
);
// display the grid cursor
void
CursorOn
(
wxDC
*
DC
);
/**
* Release managed cursor.
...
...
include/pcbstruct.h
View file @
6769e4c9
...
...
@@ -74,6 +74,7 @@
#define LAYER_COUNT 32
#define LAYER_BACK (1 << LAYER_N_BACK) ///< bit mask for copper layer
#define CUIVRE_LAYER (1 << LAYER_N_BACK) ///< bit mask for copper layer
#define LAYER_2 (1 << LAYER_N_2) ///< bit mask for layer 2
#define LAYER_3 (1 << LAYER_N_3) ///< bit mask for layer 3
...
...
@@ -90,6 +91,7 @@
#define LAYER_14 (1 << LAYER_N_14) ///< bit mask for layer 14
#define LAYER_15 (1 << LAYER_N_15) ///< bit mask for layer 15
#define CMP_LAYER (1 << LAYER_N_FRONT) ///< bit mask for component layer
#define LAYER_FRONT (1 << LAYER_N_FRONT) ///< bit mask for component layer
#define ADHESIVE_LAYER_CU (1 << ADHESIVE_N_CU)
#define ADHESIVE_LAYER_CMP (1 << ADHESIVE_N_CMP)
#define SOLDERPASTE_LAYER_CU (1 << SOLDERPASTE_N_CU)
...
...
pcbnew/class_board_design_settings.cpp
View file @
6769e4c9
...
...
@@ -119,12 +119,39 @@ void EDA_BoardDesignSettings::SetCopperLayerCount( int aNewLayerCount )
// ensure consistency with the m_EnabledLayers member
m_EnabledLayers
&=
~
ALL_CU_LAYERS
;
m_EnabledLayers
|=
CUIVRE_LAYER
;
m_EnabledLayers
|=
LAYER_BACK
;
if
(
m_CopperLayerCount
>
1
)
m_EnabledLayers
|=
CMP_LAYER
;
m_EnabledLayers
|=
LAYER_FRONT
;
for
(
int
ii
=
1
;
ii
<
aNewLayerCount
-
1
;
ii
++
)
m_EnabledLayers
|=
1
<<
ii
;
}
/**
* Function SetEnabledLayers
* changes the bit-mask of enabled layers
* @param aMask = The new bit-mask of enabled layers
*/
void
EDA_BoardDesignSettings
::
SetEnabledLayers
(
int
aMask
)
{
m_EnabledLayers
=
aMask
;
// Ensure consistency with m_CopperLayerCount
long
enabledLayers
=
aMask
&
~
ALL_CU_LAYERS
;
// Back and front layers are always existing (but not necessary enabled)
// so we must count them
enabledLayers
|=
LAYER_BACK
|
LAYER_FRONT
;
long
mask
=
1
;
m_CopperLayerCount
=
0
;
for
(
int
ii
=
0
;
ii
<
NB_COPPER_LAYERS
;
ii
++
,
mask
<<=
1
)
{
if
(
(
aMask
&
mask
)
)
m_CopperLayerCount
++
;
}
// A disabled layer cannot be visible
m_VisibleLayers
&=
aMask
;
}
pcbnew/class_edge_mod.cpp
View file @
6769e4c9
...
...
@@ -169,7 +169,7 @@ void EDGE_MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
color
=
g_DesignSettings
.
m_LayerColor
[
m_Layer
];
frame
=
(
WinEDA_BasePcbFrame
*
)
panel
->
m_Parent
;
frame
=
(
WinEDA_BasePcbFrame
*
)
panel
->
GetParent
()
;
screen
=
frame
->
GetScreen
();
...
...
@@ -189,7 +189,7 @@ void EDGE_MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
if
(
!
typeaff
)
typeaff
=
SKETCH
;
}
if
(
panel
->
GetScreen
()
->
Scale
(
m_Width
)
<
L_MIN_DESSIN
)
if
(
screen
->
Scale
(
m_Width
)
<
L_MIN_DESSIN
)
typeaff
=
FILAIRE
;
switch
(
type_trace
)
...
...
pcbnew/class_pad_draw_functions.cpp
View file @
6769e4c9
...
...
@@ -38,7 +38,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode,
if
(
m_Flags
&
DO_NOT_DRAW
)
return
;
WinEDA_BasePcbFrame
*
frame
=
(
WinEDA_BasePcbFrame
*
)
panel
->
m_Parent
;
WinEDA_BasePcbFrame
*
frame
=
(
WinEDA_BasePcbFrame
*
)
panel
->
GetParent
()
;
PCB_SCREEN
*
screen
=
frame
->
GetScreen
();
if
(
frame
->
m_DisplayPadFill
==
FILLED
)
fillpad
=
1
;
...
...
pcbnew/class_text_mod.cpp
View file @
6769e4c9
...
...
@@ -345,7 +345,7 @@ void TEXTE_MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode,
return
;
screen
=
(
PCB_SCREEN
*
)
panel
->
GetScreen
();
frame
=
(
WinEDA_BasePcbFrame
*
)
panel
->
m_Parent
;
frame
=
(
WinEDA_BasePcbFrame
*
)
panel
->
GetParent
()
;
pos
.
x
=
m_Pos
.
x
-
offset
.
x
;
pos
.
y
=
m_Pos
.
y
-
offset
.
y
;
...
...
pcbnew/class_track.cpp
View file @
6769e4c9
...
...
@@ -715,7 +715,7 @@ void SEGVIA::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoi
int
curr_layer
=
(
(
PCB_SCREEN
*
)
panel
->
GetScreen
()
)
->
m_Active_Layer
;
int
fillvia
=
0
;
WinEDA_BasePcbFrame
*
frame
=
(
WinEDA_BasePcbFrame
*
)
panel
->
m_Parent
;
WinEDA_BasePcbFrame
*
frame
=
(
WinEDA_BasePcbFrame
*
)
panel
->
GetParent
()
;
PCB_SCREEN
*
screen
=
frame
->
GetScreen
();
if
(
frame
->
m_DisplayViaFill
==
FILLED
)
...
...
pcbnew/cotation.cpp
View file @
6769e4c9
...
...
@@ -208,7 +208,7 @@ static void Exit_EditCotation( WinEDA_DrawPanel* Panel, wxDC* DC )
status_cotation
=
0
;
Panel
->
ManageCurseur
=
NULL
;
Panel
->
ForceCloseManageCurseur
=
NULL
;
((
WinEDA_PcbFrame
*
)
Panel
->
m_Parent
)
->
SetCurItem
(
NULL
);
((
WinEDA_PcbFrame
*
)
Panel
->
GetParent
()
)
->
SetCurItem
(
NULL
);
}
...
...
pcbnew/dialog_layers_setup.cpp
View file @
6769e4c9
...
...
@@ -524,6 +524,11 @@ void DIALOG_LAYERS_SETUP::OnOkButtonClick( wxCommandEvent& event )
m_EnabledLayers
=
getUILayerMask
();
m_Pcb
->
SetEnabledLayers
(
m_EnabledLayers
);
/* Ensure enabled layers are also visible
* This is mainly to avoid mistakes if some enabled
* layers are not visible when exiting this dialog
*/
m_Pcb
->
SetVisibleLayers
(
m_EnabledLayers
);
for
(
int
layer
=
FIRST_COPPER_LAYER
;
layer
<=
LAST_COPPER_LAYER
;
++
layer
)
...
...
pcbnew/dragsegm.cpp
View file @
6769e4c9
...
...
@@ -124,7 +124,7 @@ void Build_1_Pad_SegmentsToDrag( WinEDA_DrawPanel* panel, wxDC* DC, D_PAD* PtPad
int
net_code
=
PtPad
->
GetNet
();
int
MasqueLayer
;
wxPoint
pos
;
BOARD
*
pcb
=
(
(
WinEDA_BasePcbFrame
*
)
(
panel
->
m_Parent
)
)
->
GetBoard
();
BOARD
*
pcb
=
(
(
WinEDA_BasePcbFrame
*
)
(
panel
->
GetParent
()
)
)
->
GetBoard
();
Track
=
pcb
->
m_Track
->
GetStartNetCode
(
net_code
);
...
...
@@ -197,7 +197,7 @@ void Collect_TrackSegmentsToDrag( WinEDA_DrawPanel* panel, wxDC* DC,
* Les net_codes sont supposes a jour.
*/
{
BOARD
*
pcb
=
(
(
WinEDA_BasePcbFrame
*
)
(
panel
->
m_Parent
)
)
->
GetBoard
();
BOARD
*
pcb
=
(
(
WinEDA_BasePcbFrame
*
)
(
panel
->
GetParent
()
)
)
->
GetBoard
();
TRACK
*
track
=
pcb
->
m_Track
->
GetStartNetCode
(
net_code
);
for
(
;
track
;
track
=
track
->
Next
()
)
...
...
pcbnew/edit_pcb_text.cpp
View file @
6769e4c9
...
...
@@ -33,7 +33,7 @@ void Abort_Edit_Pcb_Text( WinEDA_DrawPanel* Panel, wxDC* DC )
{
Panel
->
ManageCurseur
=
NULL
;
Panel
->
ForceCloseManageCurseur
=
NULL
;
(
(
WinEDA_PcbFrame
*
)
Panel
->
m_Parent
)
->
SetCurItem
(
NULL
);
(
(
WinEDA_PcbFrame
*
)
Panel
->
GetParent
()
)
->
SetCurItem
(
NULL
);
TEXTE_PCB
*
TextePcb
=
(
TEXTE_PCB
*
)
Panel
->
GetScreen
()
->
GetCurItem
();
...
...
pcbnew/editedge.cpp
View file @
6769e4c9
...
...
@@ -192,7 +192,7 @@ static void Exit_EditEdge( WinEDA_DrawPanel* Panel, wxDC* DC )
}
Panel
->
ManageCurseur
=
NULL
;
Panel
->
ForceCloseManageCurseur
=
NULL
;
(
(
WinEDA_PcbFrame
*
)
Panel
->
m_Parent
)
->
SetCurItem
(
NULL
);
(
(
WinEDA_PcbFrame
*
)
Panel
->
GetParent
()
)
->
SetCurItem
(
NULL
);
}
...
...
pcbnew/editrack.cpp
View file @
6769e4c9
...
...
@@ -35,7 +35,7 @@ static PICKED_ITEMS_LIST s_ItemsListPicker;
*/
static
void
Exit_Editrack
(
WinEDA_DrawPanel
*
Panel
,
wxDC
*
DC
)
{
WinEDA_PcbFrame
*
frame
=
(
WinEDA_PcbFrame
*
)
Panel
->
m_Parent
;
WinEDA_PcbFrame
*
frame
=
(
WinEDA_PcbFrame
*
)
Panel
->
GetParent
()
;
TRACK
*
track
=
(
TRACK
*
)
frame
->
GetCurItem
();
if
(
track
&&
(
track
->
Type
()
==
TYPE_VIA
||
track
->
Type
()
==
TYPE_TRACK
)
)
...
...
@@ -616,7 +616,7 @@ TRACK* LocateIntrusion( TRACK* listStart, TRACK* aTrack )
*/
static
void
PushTrack
(
WinEDA_DrawPanel
*
panel
)
{
BOARD
*
pcb
=
(
(
WinEDA_BasePcbFrame
*
)
(
panel
->
m_Parent
)
)
->
GetBoard
();
BOARD
*
pcb
=
(
(
WinEDA_BasePcbFrame
*
)
(
panel
->
GetParent
()
)
)
->
GetBoard
();
wxPoint
cursor
=
ActiveScreen
->
m_Curseur
;
wxPoint
cv
,
vec
,
n
;
TRACK
*
track
=
g_CurrentTrackSegment
;
...
...
@@ -682,7 +682,7 @@ void ShowNewTrackWhenMovingCursor( WinEDA_DrawPanel* panel,
D
(
g_CurrentTrackList
.
VerifyListIntegrity
();
);
PCB_SCREEN
*
screen
=
(
PCB_SCREEN
*
)
panel
->
GetScreen
();
WinEDA_BasePcbFrame
*
frame
=
(
WinEDA_BasePcbFrame
*
)
panel
->
m_Parent
;
WinEDA_BasePcbFrame
*
frame
=
(
WinEDA_BasePcbFrame
*
)
panel
->
GetParent
()
;
bool
Track_fill_copy
=
DisplayOpt
.
DisplayPcbTrackFill
;
DisplayOpt
.
DisplayPcbTrackFill
=
true
;
...
...
pcbnew/mirepcb.cpp
View file @
6769e4c9
...
...
@@ -181,7 +181,7 @@ static void AbortMoveAndEditTarget( WinEDA_DrawPanel* Panel, wxDC* DC )
Panel
->
ManageCurseur
=
NULL
;
Panel
->
ForceCloseManageCurseur
=
NULL
;
(
(
WinEDA_PcbFrame
*
)
Panel
->
m_Parent
)
->
SetCurItem
(
NULL
);
(
(
WinEDA_PcbFrame
*
)
Panel
->
GetParent
()
)
->
SetCurItem
(
NULL
);
if
(
MirePcb
==
NULL
)
return
;
...
...
pcbnew/modules.cpp
View file @
6769e4c9
...
...
@@ -53,7 +53,7 @@ void Show_Pads_On_Off( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* module )
*/
void
Rastnest_On_Off
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
MODULE
*
module
)
{
WinEDA_BasePcbFrame
*
frame
=
(
WinEDA_BasePcbFrame
*
)
panel
->
m_Parent
;
WinEDA_BasePcbFrame
*
frame
=
(
WinEDA_BasePcbFrame
*
)
panel
->
GetParent
()
;
frame
->
build_ratsnest_module
(
DC
,
module
);
frame
->
trace_ratsnest_module
(
DC
);
...
...
@@ -153,7 +153,7 @@ void Abort_MoveOrCopyModule( WinEDA_DrawPanel* Panel, wxDC* DC )
DRAG_SEGM
*
pt_drag
;
TRACK
*
pt_segm
;
MODULE
*
module
;
WinEDA_PcbFrame
*
pcbframe
=
(
WinEDA_PcbFrame
*
)
Panel
->
m_Parent
;
WinEDA_PcbFrame
*
pcbframe
=
(
WinEDA_PcbFrame
*
)
Panel
->
GetParent
()
;
module
=
(
MODULE
*
)
pcbframe
->
GetScreen
()
->
GetCurItem
();
pcbframe
->
GetBoard
()
->
m_Status_Pcb
&=
~
RATSNEST_ITEM_LOCAL_OK
;
...
...
@@ -594,7 +594,7 @@ void DrawModuleOutlines( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* module )
if
(
g_Show_Module_Ratsnest
&&
panel
)
{
WinEDA_BasePcbFrame
*
frame
=
(
WinEDA_BasePcbFrame
*
)
panel
->
m_Parent
;
WinEDA_BasePcbFrame
*
frame
=
(
WinEDA_BasePcbFrame
*
)
panel
->
GetParent
()
;
frame
->
build_ratsnest_module
(
DC
,
module
);
frame
->
trace_ratsnest_module
(
DC
);
}
...
...
pcbnew/move_or_drag_track.cpp
View file @
6769e4c9
...
...
@@ -62,7 +62,7 @@ static void Abort_MoveTrack( WinEDA_DrawPanel* Panel, wxDC* DC )
Panel
->
GetScreen
()
->
m_Curseur
=
oldpos
;
g_HightLigt_Status
=
FALSE
;
(
(
WinEDA_PcbFrame
*
)
Panel
->
m_Parent
)
->
GetBoard
()
->
DrawHighLight
(
(
(
WinEDA_PcbFrame
*
)
Panel
->
GetParent
()
)
->
GetBoard
()
->
DrawHighLight
(
Panel
,
DC
,
g_HightLigth_NetCode
);
...
...
@@ -107,7 +107,7 @@ static void Abort_MoveTrack( WinEDA_DrawPanel* Panel, wxDC* DC )
Panel
->
ManageCurseur
=
NULL
;
Panel
->
ForceCloseManageCurseur
=
NULL
;
(
(
WinEDA_PcbFrame
*
)
Panel
->
m_Parent
)
->
SetCurItem
(
NULL
);
(
(
WinEDA_PcbFrame
*
)
Panel
->
GetParent
()
)
->
SetCurItem
(
NULL
);
/* Undo move and redraw trace segments. */
DRAG_SEGM
*
pt_drag
=
g_DragSegmentList
;
...
...
@@ -126,7 +126,7 @@ static void Abort_MoveTrack( WinEDA_DrawPanel* Panel, wxDC* DC )
g_HightLigth_NetCode
=
Old_HightLigth_NetCode
;
g_HightLigt_Status
=
Old_HightLigt_Status
;
if
(
g_HightLigt_Status
)
(
(
WinEDA_PcbFrame
*
)
Panel
->
m_Parent
)
->
GetBoard
()
->
DrawHighLight
(
(
(
WinEDA_PcbFrame
*
)
Panel
->
GetParent
()
)
->
GetBoard
()
->
DrawHighLight
(
Panel
,
DC
,
g_HightLigth_NetCode
);
...
...
@@ -194,7 +194,7 @@ static void Show_MoveNode( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
DisplayOpt
.
DisplayPcbTrackFill
=
track_fill_copy
;
// Display track length
WinEDA_BasePcbFrame
*
frame
=
(
WinEDA_BasePcbFrame
*
)
panel
->
m_Parent
;
WinEDA_BasePcbFrame
*
frame
=
(
WinEDA_BasePcbFrame
*
)
panel
->
GetParent
()
;
Track
->
DisplayInfo
(
frame
);
}
...
...
@@ -454,7 +454,7 @@ static void Show_Drag_Track_Segment_With_Cte_Slope( WinEDA_DrawPanel* panel,
tSegmentToEnd
->
Draw
(
panel
,
DC
,
draw_mode
);
// Display track length
WinEDA_BasePcbFrame
*
frame
=
(
WinEDA_BasePcbFrame
*
)
panel
->
m_Parent
;
WinEDA_BasePcbFrame
*
frame
=
(
WinEDA_BasePcbFrame
*
)
panel
->
GetParent
()
;
Track
->
DisplayInfo
(
frame
);
}
...
...
pcbnew/print_board_functions.cpp
View file @
6769e4c9
...
...
@@ -200,12 +200,12 @@ static void Print_Module( WinEDA_DrawPanel* panel, wxDC* DC,
if
(
(
masklayer
&
ALL_CU_LAYERS
)
==
0
)
{
int
tmp_fill
=
(
(
WinEDA_BasePcbFrame
*
)
panel
->
m_Parent
)
->
m_DisplayPadFill
;
(
(
WinEDA_BasePcbFrame
*
)
panel
->
GetParent
()
)
->
m_DisplayPadFill
;
// Switch in sketch mode
(
(
WinEDA_BasePcbFrame
*
)
panel
->
m_Parent
)
->
m_DisplayPadFill
=
0
;
(
(
WinEDA_BasePcbFrame
*
)
panel
->
GetParent
()
)
->
m_DisplayPadFill
=
0
;
pt_pad
->
Draw
(
panel
,
DC
,
draw_mode
);
(
(
WinEDA_BasePcbFrame
*
)
panel
->
m_Parent
)
->
m_DisplayPadFill
=
(
(
WinEDA_BasePcbFrame
*
)
panel
->
GetParent
()
)
->
m_DisplayPadFill
=
tmp_fill
;
}
else
// on copper layer, draw pads according to current options
...
...
pcbnew/tracemod.cpp
View file @
6769e4c9
...
...
@@ -33,7 +33,7 @@ void Trace_Pads_Only( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* Module,
WinEDA_BasePcbFrame
*
frame
;
screen
=
(
PCB_SCREEN
*
)
panel
->
GetScreen
();
frame
=
(
WinEDA_BasePcbFrame
*
)
panel
->
m_Parent
;
frame
=
(
WinEDA_BasePcbFrame
*
)
panel
->
GetParent
()
;
tmp
=
frame
->
m_DisplayPadFill
;
frame
->
m_DisplayPadFill
=
FALSE
;
...
...
pcbnew/zones_by_polygon.cpp
View file @
6769e4c9
...
...
@@ -139,7 +139,7 @@ static void Abort_Zone_Create_Outline( WinEDA_DrawPanel* Panel, wxDC* DC )
* cancels the Begin_Zone command if at least one EDGE_ZONE was created.
*/
{
WinEDA_PcbFrame
*
pcbframe
=
(
WinEDA_PcbFrame
*
)
Panel
->
m_Parent
;
WinEDA_PcbFrame
*
pcbframe
=
(
WinEDA_PcbFrame
*
)
Panel
->
GetParent
()
;
ZONE_CONTAINER
*
zone
=
pcbframe
->
GetBoard
()
->
m_CurrentZoneContour
;
if
(
zone
)
...
...
@@ -383,7 +383,7 @@ void Abort_Zone_Move_Corner_Or_Outlines( WinEDA_DrawPanel* Panel, wxDC* DC )
* cancels the Begin_Zone state if at least one EDGE_ZONE has been created.
*/
{
WinEDA_PcbFrame
*
pcbframe
=
(
WinEDA_PcbFrame
*
)
Panel
->
m_Parent
;
WinEDA_PcbFrame
*
pcbframe
=
(
WinEDA_PcbFrame
*
)
Panel
->
GetParent
()
;
ZONE_CONTAINER
*
zone_container
=
(
ZONE_CONTAINER
*
)
pcbframe
->
GetCurItem
();
if
(
zone_container
->
m_Flags
==
IS_MOVED
)
...
...
@@ -431,7 +431,7 @@ void Show_Zone_Corner_Or_Outline_While_Move_Mouse( WinEDA_DrawPanel* Panel, wxDC
/* Redraws the zone outline when moving a corner according to the cursor position
*/
{
WinEDA_PcbFrame
*
pcbframe
=
(
WinEDA_PcbFrame
*
)
Panel
->
m_Parent
;
WinEDA_PcbFrame
*
pcbframe
=
(
WinEDA_PcbFrame
*
)
Panel
->
GetParent
()
;
ZONE_CONTAINER
*
zone
=
(
ZONE_CONTAINER
*
)
pcbframe
->
GetCurItem
();
if
(
erase
)
/* Undraw edge in old position*/
...
...
@@ -727,7 +727,7 @@ static void Show_New_Edge_While_Move_Mouse( WinEDA_DrawPanel* panel, wxDC* DC, b
/* Redraws the zone outlines when moving mouse
*/
{
WinEDA_PcbFrame
*
pcbframe
=
(
WinEDA_PcbFrame
*
)
panel
->
m_Parent
;
WinEDA_PcbFrame
*
pcbframe
=
(
WinEDA_PcbFrame
*
)
panel
->
GetParent
()
;
wxPoint
c_pos
=
pcbframe
->
GetScreen
()
->
m_Curseur
;
ZONE_CONTAINER
*
zone
=
pcbframe
->
GetBoard
()
->
m_CurrentZoneContour
;
...
...
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