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
b39d562a
Commit
b39d562a
authored
Sep 20, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restored previous function names.
parent
c00533a1
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
49 additions
and
54 deletions
+49
-54
wxPcbStruct.h
include/wxPcbStruct.h
+2
-2
class_pcb_layer_widget.cpp
pcbnew/class_pcb_layer_widget.cpp
+2
-2
deltrack.cpp
pcbnew/deltrack.cpp
+2
-2
dialog_general_options.cpp
pcbnew/dialogs/dialog_general_options.cpp
+1
-1
dialog_global_deletion.cpp
pcbnew/dialogs/dialog_global_deletion.cpp
+1
-1
dialog_layers_setup.cpp
pcbnew/dialogs/dialog_layers_setup.cpp
+5
-5
dimension.cpp
pcbnew/dimension.cpp
+1
-1
edit.cpp
pcbnew/edit.cpp
+10
-10
editedge.cpp
pcbnew/editedge.cpp
+2
-2
editrack-part2.cpp
pcbnew/editrack-part2.cpp
+6
-6
hotkeys_board_editor.cpp
pcbnew/hotkeys_board_editor.cpp
+5
-5
onleftclick.cpp
pcbnew/onleftclick.cpp
+3
-3
pcbframe.cpp
pcbnew/pcbframe.cpp
+3
-3
tool_pcb.cpp
pcbnew/tool_pcb.cpp
+1
-1
toolbars_update_user_interface.cpp
pcbnew/toolbars_update_user_interface.cpp
+1
-1
selection_tool.cpp
pcbnew/tools/selection_tool.cpp
+0
-5
zones_by_polygon.cpp
pcbnew/zones_by_polygon.cpp
+4
-4
No files found.
include/wxPcbStruct.h
View file @
b39d562a
...
@@ -136,13 +136,13 @@ protected:
...
@@ -136,13 +136,13 @@ protected:
* will change the currently active layer to \a aLayer and also
* will change the currently active layer to \a aLayer and also
* update the PCB_LAYER_WIDGET.
* update the PCB_LAYER_WIDGET.
*/
*/
void
set
Current
Layer
(
LAYER_NUM
aLayer
,
bool
doLayerWidgetUpdate
=
true
);
void
set
Active
Layer
(
LAYER_NUM
aLayer
,
bool
doLayerWidgetUpdate
=
true
);
/**
/**
* Function getActiveLayer
* Function getActiveLayer
* returns the active layer
* returns the active layer
*/
*/
LAYER_NUM
get
Current
Layer
()
LAYER_NUM
get
Active
Layer
()
{
{
return
(
(
PCB_SCREEN
*
)
GetScreen
()
)
->
m_Active_Layer
;
return
(
(
PCB_SCREEN
*
)
GetScreen
()
)
->
m_Active_Layer
;
}
}
...
...
pcbnew/class_pcb_layer_widget.cpp
View file @
b39d562a
...
@@ -183,7 +183,7 @@ void PCB_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event )
...
@@ -183,7 +183,7 @@ void PCB_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event )
if
(
IsCopperLayer
(
layer
)
)
if
(
IsCopperLayer
(
layer
)
)
{
{
bool
loc_visible
=
visible
;
bool
loc_visible
=
visible
;
if
(
force_active_layer_visible
&&
(
layer
==
myframe
->
get
Current
Layer
()
)
)
if
(
force_active_layer_visible
&&
(
layer
==
myframe
->
get
Active
Layer
()
)
)
loc_visible
=
true
;
loc_visible
=
true
;
cb
->
SetValue
(
loc_visible
);
cb
->
SetValue
(
loc_visible
);
...
@@ -354,7 +354,7 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( LAYER_NUM aLayer )
...
@@ -354,7 +354,7 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( LAYER_NUM aLayer )
{
{
// the layer change from the PCB_LAYER_WIDGET can be denied by returning
// the layer change from the PCB_LAYER_WIDGET can be denied by returning
// false from this function.
// false from this function.
myframe
->
set
Current
Layer
(
aLayer
,
false
);
myframe
->
set
Active
Layer
(
aLayer
,
false
);
if
(
m_alwaysShowActiveCopperLayer
)
if
(
m_alwaysShowActiveCopperLayer
)
OnLayerSelected
();
OnLayerSelected
();
...
...
pcbnew/deltrack.cpp
View file @
b39d562a
...
@@ -53,7 +53,7 @@ TRACK* PCB_EDIT_FRAME::Delete_Segment( wxDC* DC, TRACK* aTrack )
...
@@ -53,7 +53,7 @@ TRACK* PCB_EDIT_FRAME::Delete_Segment( wxDC* DC, TRACK* aTrack )
{
{
if
(
g_CurrentTrackList
.
GetCount
()
>
0
)
if
(
g_CurrentTrackList
.
GetCount
()
>
0
)
{
{
LAYER_NUM
previous_layer
=
get
Current
Layer
();
LAYER_NUM
previous_layer
=
get
Active
Layer
();
DBG
(
g_CurrentTrackList
.
VerifyListIntegrity
();
)
DBG
(
g_CurrentTrackList
.
VerifyListIntegrity
();
)
...
@@ -86,7 +86,7 @@ TRACK* PCB_EDIT_FRAME::Delete_Segment( wxDC* DC, TRACK* aTrack )
...
@@ -86,7 +86,7 @@ TRACK* PCB_EDIT_FRAME::Delete_Segment( wxDC* DC, TRACK* aTrack )
// Correct active layer which could change if a via
// Correct active layer which could change if a via
// has been erased
// has been erased
set
Current
Layer
(
previous_layer
);
set
Active
Layer
(
previous_layer
);
UpdateStatusBar
();
UpdateStatusBar
();
...
...
pcbnew/dialogs/dialog_general_options.cpp
View file @
b39d562a
...
@@ -238,7 +238,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
...
@@ -238,7 +238,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
// Apply new display options to the GAL canvas (this is faster than recaching)
// Apply new display options to the GAL canvas (this is faster than recaching)
settings
->
LoadDisplayOptions
(
DisplayOpt
);
settings
->
LoadDisplayOptions
(
DisplayOpt
);
setHighContrastLayer
(
get
Current
Layer
()
);
setHighContrastLayer
(
get
Active
Layer
()
);
// m_galCanvas->GetView()->EnableTopLayer( state );
// m_galCanvas->GetView()->EnableTopLayer( state );
if
(
m_galCanvasActive
)
if
(
m_galCanvasActive
)
...
...
pcbnew/dialogs/dialog_global_deletion.cpp
View file @
b39d562a
...
@@ -37,7 +37,7 @@ DIALOG_GLOBAL_DELETION::DIALOG_GLOBAL_DELETION( PCB_EDIT_FRAME* parent )
...
@@ -37,7 +37,7 @@ DIALOG_GLOBAL_DELETION::DIALOG_GLOBAL_DELETION( PCB_EDIT_FRAME* parent )
void
PCB_EDIT_FRAME
::
InstallPcbGlobalDeleteFrame
(
const
wxPoint
&
pos
)
void
PCB_EDIT_FRAME
::
InstallPcbGlobalDeleteFrame
(
const
wxPoint
&
pos
)
{
{
DIALOG_GLOBAL_DELETION
dlg
(
this
);
DIALOG_GLOBAL_DELETION
dlg
(
this
);
dlg
.
SetCurrentLayer
(
get
Current
Layer
()
);
dlg
.
SetCurrentLayer
(
get
Active
Layer
()
);
dlg
.
ShowModal
();
dlg
.
ShowModal
();
}
}
...
...
pcbnew/dialogs/dialog_layers_setup.cpp
View file @
b39d562a
...
@@ -669,11 +669,11 @@ void PCB_EDIT_FRAME::InstallDialogLayerSetup()
...
@@ -669,11 +669,11 @@ void PCB_EDIT_FRAME::InstallDialogLayerSetup()
if
(
dlg
.
ShowModal
()
==
wxID_CANCEL
)
if
(
dlg
.
ShowModal
()
==
wxID_CANCEL
)
return
;
return
;
wxLogDebug
(
wxT
(
"Current layer selected %d."
),
get
Current
Layer
()
);
wxLogDebug
(
wxT
(
"Current layer selected %d."
),
get
Active
Layer
()
);
// If the current active layer was removed, find the next avaiable layer to set as the
// If the current active layer was removed, find the next avaiable layer to set as the
// active layer.
// active layer.
if
(
!
(
GetLayerMask
(
get
Current
Layer
()
)
&
GetBoard
()
->
GetEnabledLayers
()
)
)
if
(
!
(
GetLayerMask
(
get
Active
Layer
()
)
&
GetBoard
()
->
GetEnabledLayers
()
)
)
{
{
for
(
LAYER_NUM
i
=
FIRST_LAYER
;
i
<
NB_LAYERS
;
++
i
)
for
(
LAYER_NUM
i
=
FIRST_LAYER
;
i
<
NB_LAYERS
;
++
i
)
{
{
...
@@ -684,14 +684,14 @@ void PCB_EDIT_FRAME::InstallDialogLayerSetup()
...
@@ -684,14 +684,14 @@ void PCB_EDIT_FRAME::InstallDialogLayerSetup()
if
(
GetLayerMask
(
tmp
)
&
GetBoard
()
->
GetEnabledLayers
()
)
if
(
GetLayerMask
(
tmp
)
&
GetBoard
()
->
GetEnabledLayers
()
)
{
{
wxLogDebug
(
wxT
(
"Setting current layer to %d."
),
get
Current
Layer
()
);
wxLogDebug
(
wxT
(
"Setting current layer to %d."
),
get
Active
Layer
()
);
set
Current
Layer
(
tmp
,
true
);
set
Active
Layer
(
tmp
,
true
);
break
;
break
;
}
}
}
}
}
}
else
else
{
{
set
CurrentLayer
(
getCurrent
Layer
(),
true
);
set
ActiveLayer
(
getActive
Layer
(),
true
);
}
}
}
}
pcbnew/dimension.cpp
View file @
b39d562a
...
@@ -245,7 +245,7 @@ DIMENSION* PCB_EDIT_FRAME::EditDimension( DIMENSION* aDimension, wxDC* aDC )
...
@@ -245,7 +245,7 @@ DIMENSION* PCB_EDIT_FRAME::EditDimension( DIMENSION* aDimension, wxDC* aDC )
aDimension
=
new
DIMENSION
(
GetBoard
()
);
aDimension
=
new
DIMENSION
(
GetBoard
()
);
aDimension
->
SetFlags
(
IS_NEW
);
aDimension
->
SetFlags
(
IS_NEW
);
aDimension
->
SetLayer
(
get
Current
Layer
()
);
aDimension
->
SetLayer
(
get
Active
Layer
()
);
aDimension
->
m_crossBarO
=
aDimension
->
m_crossBarF
=
pos
;
aDimension
->
m_crossBarO
=
aDimension
->
m_crossBarF
=
pos
;
aDimension
->
m_featureLineDO
=
aDimension
->
m_featureLineDF
=
pos
;
aDimension
->
m_featureLineDO
=
aDimension
->
m_featureLineDF
=
pos
;
...
...
pcbnew/edit.cpp
View file @
b39d562a
...
@@ -917,10 +917,10 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
...
@@ -917,10 +917,10 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
break
;
break
;
case
ID_POPUP_PCB_SELECT_LAYER
:
case
ID_POPUP_PCB_SELECT_LAYER
:
itmp
=
SelectLayer
(
get
Current
Layer
(),
UNDEFINED_LAYER
,
UNDEFINED_LAYER
);
itmp
=
SelectLayer
(
get
Active
Layer
(),
UNDEFINED_LAYER
,
UNDEFINED_LAYER
);
if
(
itmp
>=
0
)
if
(
itmp
>=
0
)
set
Current
Layer
(
itmp
);
set
Active
Layer
(
itmp
);
m_canvas
->
MoveCursorToCrossHair
();
m_canvas
->
MoveCursorToCrossHair
();
break
;
break
;
...
@@ -930,19 +930,19 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
...
@@ -930,19 +930,19 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
break
;
break
;
case
ID_POPUP_PCB_SELECT_NO_CU_LAYER
:
case
ID_POPUP_PCB_SELECT_NO_CU_LAYER
:
itmp
=
SelectLayer
(
get
Current
Layer
(),
FIRST_NON_COPPER_LAYER
,
UNDEFINED_LAYER
);
itmp
=
SelectLayer
(
get
Active
Layer
(),
FIRST_NON_COPPER_LAYER
,
UNDEFINED_LAYER
);
if
(
itmp
>=
0
)
if
(
itmp
>=
0
)
set
Current
Layer
(
itmp
);
set
Active
Layer
(
itmp
);
m_canvas
->
MoveCursorToCrossHair
();
m_canvas
->
MoveCursorToCrossHair
();
break
;
break
;
case
ID_POPUP_PCB_SELECT_CU_LAYER
:
case
ID_POPUP_PCB_SELECT_CU_LAYER
:
itmp
=
SelectLayer
(
get
Current
Layer
(),
UNDEFINED_LAYER
,
LAST_COPPER_LAYER
);
itmp
=
SelectLayer
(
get
Active
Layer
(),
UNDEFINED_LAYER
,
LAST_COPPER_LAYER
);
if
(
itmp
>=
0
)
if
(
itmp
>=
0
)
set
Current
Layer
(
itmp
);
set
Active
Layer
(
itmp
);
break
;
break
;
...
@@ -952,7 +952,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
...
@@ -952,7 +952,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
break
;
break
;
case
ID_TOOLBARH_PCB_SELECT_LAYER
:
case
ID_TOOLBARH_PCB_SELECT_LAYER
:
set
Current
Layer
(
m_SelLayerBox
->
GetLayerSelection
()
);
set
Active
Layer
(
m_SelLayerBox
->
GetLayerSelection
()
);
if
(
DisplayOpt
.
ContrastModeDisplay
)
if
(
DisplayOpt
.
ContrastModeDisplay
)
m_canvas
->
Refresh
(
true
);
m_canvas
->
Refresh
(
true
);
...
@@ -1244,7 +1244,7 @@ void PCB_EDIT_FRAME::RemoveStruct( BOARD_ITEM* Item, wxDC* DC )
...
@@ -1244,7 +1244,7 @@ void PCB_EDIT_FRAME::RemoveStruct( BOARD_ITEM* Item, wxDC* DC )
void
PCB_EDIT_FRAME
::
SwitchLayer
(
wxDC
*
DC
,
LAYER_NUM
layer
)
void
PCB_EDIT_FRAME
::
SwitchLayer
(
wxDC
*
DC
,
LAYER_NUM
layer
)
{
{
LAYER_NUM
curLayer
=
get
Current
Layer
();
LAYER_NUM
curLayer
=
get
Active
Layer
();
// Check if the specified layer matches the present layer
// Check if the specified layer matches the present layer
if
(
layer
==
curLayer
)
if
(
layer
==
curLayer
)
...
@@ -1286,7 +1286,7 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer )
...
@@ -1286,7 +1286,7 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer )
GetScreen
()
->
m_Route_Layer_TOP
=
curLayer
;
GetScreen
()
->
m_Route_Layer_TOP
=
curLayer
;
GetScreen
()
->
m_Route_Layer_BOTTOM
=
layer
;
GetScreen
()
->
m_Route_Layer_BOTTOM
=
layer
;
set
Current
Layer
(
curLayer
);
set
Active
Layer
(
curLayer
);
if
(
Other_Layer_Route
(
(
TRACK
*
)
GetScreen
()
->
GetCurItem
(),
DC
)
)
if
(
Other_Layer_Route
(
(
TRACK
*
)
GetScreen
()
->
GetCurItem
(),
DC
)
)
{
{
...
@@ -1307,7 +1307,7 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer )
...
@@ -1307,7 +1307,7 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer )
// and a non-copper layer, or vice-versa?
// and a non-copper layer, or vice-versa?
// ...
// ...
set
Current
Layer
(
layer
);
set
Active
Layer
(
layer
);
if
(
DisplayOpt
.
ContrastModeDisplay
)
if
(
DisplayOpt
.
ContrastModeDisplay
)
RefreshCanvas
();
RefreshCanvas
();
...
...
pcbnew/editedge.cpp
View file @
b39d562a
...
@@ -246,7 +246,7 @@ DRAWSEGMENT* PCB_EDIT_FRAME::Begin_DrawSegment( DRAWSEGMENT* Segment, STROKE_T s
...
@@ -246,7 +246,7 @@ DRAWSEGMENT* PCB_EDIT_FRAME::Begin_DrawSegment( DRAWSEGMENT* Segment, STROKE_T s
s_large
=
GetDesignSettings
().
m_DrawSegmentWidth
;
s_large
=
GetDesignSettings
().
m_DrawSegmentWidth
;
if
(
get
Current
Layer
()
==
EDGE_N
)
if
(
get
Active
Layer
()
==
EDGE_N
)
{
{
s_large
=
GetDesignSettings
().
m_EdgeSegmentWidth
;
s_large
=
GetDesignSettings
().
m_EdgeSegmentWidth
;
}
}
...
@@ -255,7 +255,7 @@ DRAWSEGMENT* PCB_EDIT_FRAME::Begin_DrawSegment( DRAWSEGMENT* Segment, STROKE_T s
...
@@ -255,7 +255,7 @@ DRAWSEGMENT* PCB_EDIT_FRAME::Begin_DrawSegment( DRAWSEGMENT* Segment, STROKE_T s
{
{
SetCurItem
(
Segment
=
new
DRAWSEGMENT
(
GetBoard
()
)
);
SetCurItem
(
Segment
=
new
DRAWSEGMENT
(
GetBoard
()
)
);
Segment
->
SetFlags
(
IS_NEW
);
Segment
->
SetFlags
(
IS_NEW
);
Segment
->
SetLayer
(
get
Current
Layer
()
);
Segment
->
SetLayer
(
get
Active
Layer
()
);
Segment
->
SetWidth
(
s_large
);
Segment
->
SetWidth
(
s_large
);
Segment
->
SetShape
(
shape
);
Segment
->
SetShape
(
shape
);
Segment
->
SetAngle
(
900
);
Segment
->
SetAngle
(
900
);
...
...
pcbnew/editrack-part2.cpp
View file @
b39d562a
...
@@ -52,10 +52,10 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
...
@@ -52,10 +52,10 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
if
(
aTrack
==
NULL
)
if
(
aTrack
==
NULL
)
{
{
if
(
get
Current
Layer
()
!=
((
PCB_SCREEN
*
)
GetScreen
())
->
m_Route_Layer_TOP
)
if
(
get
Active
Layer
()
!=
((
PCB_SCREEN
*
)
GetScreen
())
->
m_Route_Layer_TOP
)
set
Current
Layer
(
((
PCB_SCREEN
*
)
GetScreen
())
->
m_Route_Layer_TOP
);
set
Active
Layer
(
((
PCB_SCREEN
*
)
GetScreen
())
->
m_Route_Layer_TOP
);
else
else
set
Current
Layer
(((
PCB_SCREEN
*
)
GetScreen
())
->
m_Route_Layer_BOTTOM
);
set
Active
Layer
(((
PCB_SCREEN
*
)
GetScreen
())
->
m_Route_Layer_BOTTOM
);
UpdateStatusBar
();
UpdateStatusBar
();
return
true
;
return
true
;
...
@@ -109,7 +109,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
...
@@ -109,7 +109,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
via
->
SetLayerPair
(
LAYER_N_BACK
,
LAYER_N_FRONT
);
via
->
SetLayerPair
(
LAYER_N_BACK
,
LAYER_N_FRONT
);
via
->
SetDrill
(
GetBoard
()
->
GetCurrentViaDrill
()
);
via
->
SetDrill
(
GetBoard
()
->
GetCurrentViaDrill
()
);
LAYER_NUM
first_layer
=
get
Current
Layer
();
LAYER_NUM
first_layer
=
get
Active
Layer
();
LAYER_NUM
last_layer
;
LAYER_NUM
last_layer
;
// prepare switch to new active layer:
// prepare switch to new active layer:
...
@@ -172,7 +172,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
...
@@ -172,7 +172,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
return
false
;
return
false
;
}
}
set
Current
Layer
(
last_layer
);
set
Active
Layer
(
last_layer
);
TRACK
*
lastNonVia
=
g_CurrentTrackSegment
;
TRACK
*
lastNonVia
=
g_CurrentTrackSegment
;
...
@@ -194,7 +194,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
...
@@ -194,7 +194,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
*/
*/
// set the layer to the new value
// set the layer to the new value
track
->
SetLayer
(
get
Current
Layer
()
);
track
->
SetLayer
(
get
Active
Layer
()
);
/* the start point is the via position and the end point is the cursor
/* the start point is the via position and the end point is the cursor
* which also is on the via (will change when moving mouse)
* which also is on the via (will change when moving mouse)
...
...
pcbnew/hotkeys_board_editor.cpp
View file @
b39d562a
...
@@ -240,7 +240,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
...
@@ -240,7 +240,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
break
;
break
;
case
HK_SWITCH_LAYER_TO_PREVIOUS
:
case
HK_SWITCH_LAYER_TO_PREVIOUS
:
ll
=
get
Current
Layer
();
ll
=
get
Active
Layer
();
if
(
(
ll
<=
LAYER_N_BACK
)
||
(
ll
>
LAYER_N_FRONT
)
)
if
(
(
ll
<=
LAYER_N_BACK
)
||
(
ll
>
LAYER_N_FRONT
)
)
break
;
break
;
...
@@ -256,7 +256,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
...
@@ -256,7 +256,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
break
;
break
;
case
HK_SWITCH_LAYER_TO_NEXT
:
case
HK_SWITCH_LAYER_TO_NEXT
:
ll
=
get
Current
Layer
();
ll
=
get
Active
Layer
();
if
(
(
ll
<
LAYER_N_BACK
)
||
(
ll
>=
LAYER_N_FRONT
)
)
if
(
(
ll
<
LAYER_N_BACK
)
||
(
ll
>=
LAYER_N_FRONT
)
)
break
;
break
;
...
@@ -374,7 +374,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
...
@@ -374,7 +374,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
break
;
break
;
case
HK_BACK_SPACE
:
case
HK_BACK_SPACE
:
if
(
/*m_ID_current_state == ID_TRACK_BUTT &&*/
(
get
Current
Layer
()
<=
LAYER_N_FRONT
)
)
if
(
/*m_ID_current_state == ID_TRACK_BUTT &&*/
(
get
Active
Layer
()
<=
LAYER_N_FRONT
)
)
{
{
if
(
!
itemCurrentlyEdited
)
if
(
!
itemCurrentlyEdited
)
{
{
...
@@ -580,7 +580,7 @@ bool PCB_EDIT_FRAME::OnHotkeyDeleteItem( wxDC* aDC )
...
@@ -580,7 +580,7 @@ bool PCB_EDIT_FRAME::OnHotkeyDeleteItem( wxDC* aDC )
switch
(
GetToolId
()
)
switch
(
GetToolId
()
)
{
{
case
ID_TRACK_BUTT
:
case
ID_TRACK_BUTT
:
if
(
get
Current
Layer
()
>
LAYER_N_FRONT
)
if
(
get
Active
Layer
()
>
LAYER_N_FRONT
)
return
false
;
return
false
;
if
(
ItemFree
)
if
(
ItemFree
)
...
@@ -949,7 +949,7 @@ bool PCB_EDIT_FRAME::OnHotkeyPlaceItem( wxDC* aDC )
...
@@ -949,7 +949,7 @@ bool PCB_EDIT_FRAME::OnHotkeyPlaceItem( wxDC* aDC )
*/
*/
TRACK
*
PCB_EDIT_FRAME
::
OnHotkeyBeginRoute
(
wxDC
*
aDC
)
TRACK
*
PCB_EDIT_FRAME
::
OnHotkeyBeginRoute
(
wxDC
*
aDC
)
{
{
if
(
get
Current
Layer
()
>
LAYER_N_FRONT
)
if
(
get
Active
Layer
()
>
LAYER_N_FRONT
)
return
NULL
;
return
NULL
;
bool
itemCurrentlyEdited
=
(
GetCurItem
()
&&
GetCurItem
()
->
GetFlags
());
bool
itemCurrentlyEdited
=
(
GetCurItem
()
&&
GetCurItem
()
->
GetFlags
());
...
...
pcbnew/onleftclick.cpp
View file @
b39d562a
...
@@ -243,7 +243,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
...
@@ -243,7 +243,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
if
(
GetToolId
()
==
ID_PCB_ARC_BUTT
)
if
(
GetToolId
()
==
ID_PCB_ARC_BUTT
)
shape
=
S_ARC
;
shape
=
S_ARC
;
if
(
IsCopperLayer
(
get
Current
Layer
()
)
)
if
(
IsCopperLayer
(
get
Active
Layer
()
)
)
{
{
DisplayError
(
this
,
_
(
"Graphic not allowed on Copper layers"
)
);
DisplayError
(
this
,
_
(
"Graphic not allowed on Copper layers"
)
);
break
;
break
;
...
@@ -267,7 +267,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
...
@@ -267,7 +267,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
break
;
break
;
case
ID_TRACK_BUTT
:
case
ID_TRACK_BUTT
:
if
(
!
IsCopperLayer
(
get
Current
Layer
()
)
)
if
(
!
IsCopperLayer
(
get
Active
Layer
()
)
)
{
{
DisplayError
(
this
,
_
(
"Tracks on Copper layers only "
)
);
DisplayError
(
this
,
_
(
"Tracks on Copper layers only "
)
);
break
;
break
;
...
@@ -367,7 +367,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
...
@@ -367,7 +367,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
break
;
break
;
case
ID_PCB_DIMENSION_BUTT
:
case
ID_PCB_DIMENSION_BUTT
:
if
(
IsCopperLayer
(
get
Current
Layer
()
)
)
if
(
IsCopperLayer
(
get
Active
Layer
()
)
)
{
{
DisplayError
(
this
,
_
(
"Dimension not allowed on Copper layers"
)
);
DisplayError
(
this
,
_
(
"Dimension not allowed on Copper layers"
)
);
break
;
break
;
...
...
pcbnew/pcbframe.cpp
View file @
b39d562a
...
@@ -730,7 +730,7 @@ void PCB_EDIT_FRAME::SetGridColor(EDA_COLOR_T aColor)
...
@@ -730,7 +730,7 @@ void PCB_EDIT_FRAME::SetGridColor(EDA_COLOR_T aColor)
bool
PCB_EDIT_FRAME
::
IsMicroViaAcceptable
(
void
)
bool
PCB_EDIT_FRAME
::
IsMicroViaAcceptable
(
void
)
{
{
int
copperlayercnt
=
GetBoard
()
->
GetCopperLayerCount
(
);
int
copperlayercnt
=
GetBoard
()
->
GetCopperLayerCount
(
);
LAYER_NUM
currLayer
=
get
Current
Layer
();
LAYER_NUM
currLayer
=
get
Active
Layer
();
if
(
!
GetDesignSettings
().
m_MicroViasAllowed
)
if
(
!
GetDesignSettings
().
m_MicroViasAllowed
)
return
false
;
// Obvious..
return
false
;
// Obvious..
...
@@ -832,7 +832,7 @@ void PCB_EDIT_FRAME::setTopLayer( LAYER_NUM aLayer )
...
@@ -832,7 +832,7 @@ void PCB_EDIT_FRAME::setTopLayer( LAYER_NUM aLayer )
}
}
void
PCB_EDIT_FRAME
::
set
Current
Layer
(
LAYER_NUM
aLayer
,
bool
doLayerWidgetUpdate
)
void
PCB_EDIT_FRAME
::
set
Active
Layer
(
LAYER_NUM
aLayer
,
bool
doLayerWidgetUpdate
)
{
{
(
(
PCB_SCREEN
*
)
GetScreen
()
)
->
m_Active_Layer
=
aLayer
;
(
(
PCB_SCREEN
*
)
GetScreen
()
)
->
m_Active_Layer
=
aLayer
;
...
@@ -848,7 +848,7 @@ void PCB_EDIT_FRAME::setCurrentLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate
...
@@ -848,7 +848,7 @@ void PCB_EDIT_FRAME::setCurrentLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate
void
PCB_EDIT_FRAME
::
syncLayerWidgetLayer
()
void
PCB_EDIT_FRAME
::
syncLayerWidgetLayer
()
{
{
m_Layers
->
SelectLayer
(
get
Current
Layer
()
);
m_Layers
->
SelectLayer
(
get
Active
Layer
()
);
m_Layers
->
OnLayerSelected
();
m_Layers
->
OnLayerSelected
();
}
}
...
...
pcbnew/tool_pcb.cpp
View file @
b39d562a
...
@@ -105,7 +105,7 @@ void PCB_EDIT_FRAME::PrepareLayerIndicator()
...
@@ -105,7 +105,7 @@ void PCB_EDIT_FRAME::PrepareLayerIndicator()
previous_Route_Layer_BOTTOM_color
,
previous_via_color
;
previous_Route_Layer_BOTTOM_color
,
previous_via_color
;
/* get colors, and redraw bitmap button only on changes */
/* get colors, and redraw bitmap button only on changes */
active_layer_color
=
GetBoard
()
->
GetLayerColor
(
get
Current
Layer
());
active_layer_color
=
GetBoard
()
->
GetLayerColor
(
get
Active
Layer
());
if
(
previous_active_layer_color
!=
active_layer_color
)
if
(
previous_active_layer_color
!=
active_layer_color
)
{
{
...
...
pcbnew/toolbars_update_user_interface.cpp
View file @
b39d562a
...
@@ -96,7 +96,7 @@ void PCB_EDIT_FRAME::OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent )
...
@@ -96,7 +96,7 @@ void PCB_EDIT_FRAME::OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent )
void
PCB_EDIT_FRAME
::
OnUpdateLayerSelectBox
(
wxUpdateUIEvent
&
aEvent
)
void
PCB_EDIT_FRAME
::
OnUpdateLayerSelectBox
(
wxUpdateUIEvent
&
aEvent
)
{
{
m_SelLayerBox
->
SetLayerSelection
(
get
Current
Layer
()
);
m_SelLayerBox
->
SetLayerSelection
(
get
Active
Layer
()
);
}
}
...
...
pcbnew/tools/selection_tool.cpp
View file @
b39d562a
...
@@ -96,16 +96,11 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent )
...
@@ -96,16 +96,11 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent )
// single click? Select single object
// single click? Select single object
if
(
evt
->
IsClick
(
MB_Left
)
)
if
(
evt
->
IsClick
(
MB_Left
)
)
{
wxLogDebug
(
wxT
(
"click "
)
);
selectSingle
(
evt
->
Position
()
);
selectSingle
(
evt
->
Position
()
);
}
// drag with LMB? Select multiple objects (or at least draw a selection box) or drag them
// drag with LMB? Select multiple objects (or at least draw a selection box) or drag them
if
(
evt
->
IsDrag
(
MB_Left
)
)
if
(
evt
->
IsDrag
(
MB_Left
)
)
{
{
wxLogDebug
(
wxT
(
"drag"
)
);
if
(
m_selectedItems
.
empty
()
||
m_additive
)
if
(
m_selectedItems
.
empty
()
||
m_additive
)
{
{
// If nothings has been selected or user wants to select more
// If nothings has been selected or user wants to select more
...
...
pcbnew/zones_by_polygon.cpp
View file @
b39d562a
...
@@ -518,7 +518,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
...
@@ -518,7 +518,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
if
(
!
GetBoard
()
->
m_CurrentZoneContour
)
if
(
!
GetBoard
()
->
m_CurrentZoneContour
)
{
{
if
(
GetToolId
()
==
ID_PCB_KEEPOUT_AREA_BUTT
&&
if
(
GetToolId
()
==
ID_PCB_KEEPOUT_AREA_BUTT
&&
get
Current
Layer
()
>=
FIRST_NON_COPPER_LAYER
)
get
Active
Layer
()
>=
FIRST_NON_COPPER_LAYER
)
{
{
DisplayError
(
this
,
DisplayError
(
this
,
_
(
"Error: a keepout area is allowed only on copper layers"
)
);
_
(
"Error: a keepout area is allowed only on copper layers"
)
);
...
@@ -537,7 +537,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
...
@@ -537,7 +537,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
ZONE_EDIT_T
edited
;
ZONE_EDIT_T
edited
;
// Init zone params to reasonable values
// Init zone params to reasonable values
zone
->
SetLayer
(
get
Current
Layer
()
);
zone
->
SetLayer
(
get
Active
Layer
()
);
// Prompt user for parameters:
// Prompt user for parameters:
m_canvas
->
SetIgnoreMouseEvents
(
true
);
m_canvas
->
SetIgnoreMouseEvents
(
true
);
...
@@ -602,7 +602,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
...
@@ -602,7 +602,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
return
0
;
return
0
;
// Switch active layer to the selected zone layer
// Switch active layer to the selected zone layer
set
Current
Layer
(
zoneInfo
.
m_CurrentZone_Layer
);
set
Active
Layer
(
zoneInfo
.
m_CurrentZone_Layer
);
SetZoneSettings
(
zoneInfo
);
SetZoneSettings
(
zoneInfo
);
}
}
...
@@ -612,7 +612,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
...
@@ -612,7 +612,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
// zone (add cutout or similar zone)
// zone (add cutout or similar zone)
zoneInfo
.
m_CurrentZone_Layer
=
s_CurrentZone
->
GetLayer
();
zoneInfo
.
m_CurrentZone_Layer
=
s_CurrentZone
->
GetLayer
();
set
Current
Layer
(
s_CurrentZone
->
GetLayer
()
);
set
Active
Layer
(
s_CurrentZone
->
GetLayer
()
);
zoneInfo
<<
*
s_CurrentZone
;
zoneInfo
<<
*
s_CurrentZone
;
...
...
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