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
39476ccd
Commit
39476ccd
authored
Jun 16, 2010
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Plain Diff
added track posture patch from lorenzo marcantonio
parents
700dc818
2f5c24ae
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
310 additions
and
281 deletions
+310
-281
edit.cpp
pcbnew/edit.cpp
+8
-0
editrack.cpp
pcbnew/editrack.cpp
+6
-1
hotkeys.cpp
pcbnew/hotkeys.cpp
+9
-0
hotkeys.h
pcbnew/hotkeys.h
+1
-0
onrightclick.cpp
pcbnew/onrightclick.cpp
+3
-0
pcbnew.cpp
pcbnew/pcbnew.cpp
+1
-0
pcbnew.h
pcbnew/pcbnew.h
+1
-0
pcbnew_id.h
pcbnew/pcbnew_id.h
+281
-280
No files found.
pcbnew/edit.cpp
View file @
39476ccd
...
...
@@ -65,6 +65,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_POPUP_PCB_STOP_CURRENT_DRAWING
:
case
ID_POPUP_PCB_END_TRACK
:
case
ID_POPUP_PCB_PLACE_VIA
:
case
ID_POPUP_PCB_SWITCH_TRACK_POSTURE
:
case
ID_POPUP_PCB_PLACE_MICROVIA
:
case
ID_POPUP_PCB_IMPORT_PAD_SETTINGS
:
case
ID_POPUP_PCB_EXPORT_PAD_SETTINGS
:
...
...
@@ -339,6 +340,13 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
}
break
;
case
ID_POPUP_PCB_SWITCH_TRACK_POSTURE
:
/* XXX POSTURE XXX */
ShowNewTrackWhenMovingCursor
(
DrawPanel
,
&
dc
,
true
);
g_Alternate_Track_Posture
=
!
g_Alternate_Track_Posture
;
ShowNewTrackWhenMovingCursor
(
DrawPanel
,
&
dc
,
false
);
break
;
case
ID_POPUP_PCB_PLACE_MICROVIA
:
if
(
!
IsMicroViaAcceptable
()
)
break
;
...
...
pcbnew/editrack.cpp
View file @
39476ccd
...
...
@@ -906,11 +906,16 @@ void ComputeBreakPoint( TRACK* track, int SegmentCount, wxPoint end )
TRACK
*
lastTrack
=
track
?
track
->
Back
()
:
NULL
;
if
(
lastTrack
)
{
if
(
(
lastTrack
->
m_End
.
x
==
lastTrack
->
m_Start
.
x
)
if
(
(
(
lastTrack
->
m_End
.
x
==
lastTrack
->
m_Start
.
x
)
||
(
lastTrack
->
m_End
.
y
==
lastTrack
->
m_Start
.
y
)
)
&&
!
g_Alternate_Track_Posture
)
{
iAngle
=
45
;
}
}
else
{
if
(
g_Alternate_Track_Posture
)
{
iAngle
=
45
;
}
}
if
(
iAngle
==
0
)
...
...
pcbnew/hotkeys.cpp
View file @
39476ccd
...
...
@@ -67,6 +67,8 @@ static Ki_HotkeyInfo HkBackspace( wxT( "Delete track segment" ), HK_BACK_SPACE,
WXK_BACK
);
static
Ki_HotkeyInfo
HkAddNewTrack
(
wxT
(
"Add new track"
),
HK_ADD_NEW_TRACK
,
'X'
);
static
Ki_HotkeyInfo
HkAddVia
(
wxT
(
"Add Via"
),
HK_ADD_VIA
,
'V'
);
static
Ki_HotkeyInfo
HkSwitchTrackPosture
(
wxT
(
"Switch Track Posture"
),
HK_SWITCH_TRACK_POSTURE
,
'/'
);
static
Ki_HotkeyInfo
HkAddMicroVia
(
wxT
(
"Add MicroVia"
),
HK_ADD_MICROVIA
,
'V'
+
GR_KB_CTRL
);
static
Ki_HotkeyInfo
HkEndTrack
(
wxT
(
"End Track"
),
HK_END_TRACK
,
WXK_END
);
...
...
@@ -157,6 +159,7 @@ Ki_HotkeyInfo* s_board_edit_Hotkey_List[] =
&
HkTrackDisplayMode
,
&
HkDelete
,
&
HkBackspace
,
&
HkAddNewTrack
,
&
HkAddVia
,
&
HkAddMicroVia
,
&
HkSwitchTrackPosture
,
&
HkEndTrack
,
&
HkMoveFootprint
,
&
HkFlipFootprint
,
&
HkRotateFootprint
,
&
HkDragFootprint
,
&
HkGetAndMoveFootprint
,
&
HkLock_Unlock_Footprint
,
&
HkSavefile
,
...
...
@@ -496,6 +499,12 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct
DrawPanel
->
Refresh
();
break
;
case
HK_SWITCH_TRACK_POSTURE
:
// change the position of initial segment when creating new tracks
ShowNewTrackWhenMovingCursor
(
DrawPanel
,
DC
,
false
);
g_Alternate_Track_Posture
=
!
g_Alternate_Track_Posture
;
ShowNewTrackWhenMovingCursor
(
DrawPanel
,
DC
,
false
);
break
;
case
HK_ADD_NEW_TRACK
:
// Start new track
if
(
getActiveLayer
()
>
LAYER_N_FRONT
)
break
;
...
...
pcbnew/hotkeys.h
View file @
39476ccd
...
...
@@ -22,6 +22,7 @@ enum hotkey_id_commnand {
HK_ADD_NEW_TRACK
,
HK_ADD_VIA
,
HK_ADD_MICROVIA
,
HK_SWITCH_TRACK_POSTURE
,
HK_END_TRACK
,
HK_SAVE_BOARD
,
HK_LOAD_BOARD
,
HK_SWITCH_UNITS
,
...
...
pcbnew/onrightclick.cpp
View file @
39476ccd
...
...
@@ -448,6 +448,9 @@ void WinEDA_PcbFrame::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu )
msg
=
AddHotkeyName
(
_
(
"Place Via"
),
s_Board_Editor_Hokeys_Descr
,
HK_ADD_VIA
);
PopMenu
->
Append
(
ID_POPUP_PCB_PLACE_VIA
,
msg
);
msg
=
AddHotkeyName
(
_
(
"Switch Track Posture"
),
s_Board_Editor_Hokeys_Descr
,
HK_SWITCH_TRACK_POSTURE
);
PopMenu
->
Append
(
ID_POPUP_PCB_SWITCH_TRACK_POSTURE
,
msg
);
// See if we can place a Micro Via (4 or more layers, and start from an external layer):
if
(
IsMicroViaAcceptable
()
)
{
...
...
pcbnew/pcbnew.cpp
View file @
39476ccd
...
...
@@ -43,6 +43,7 @@ bool g_Drag_Pistes_On;
bool
g_Show_Module_Ratsnest
;
bool
g_Show_Pads_Module_in_Move
=
true
;
bool
g_Raccord_45_Auto
=
true
;
bool
g_Alternate_Track_Posture
=
false
;
bool
g_Track_45_Only_Allowed
=
true
;
// True to allow horiz, vert. and 45deg only tracks
bool
Segments_45_Only
;
// True to allow horiz, vert. and 45deg only graphic segments
bool
g_TwoSegmentTrackBuild
=
true
;
...
...
pcbnew/pcbnew.h
View file @
39476ccd
...
...
@@ -61,6 +61,7 @@ extern const wxString g_FootprintLibFileWildcard; // Wildcard for footprint li
extern
bool
g_Track_45_Only_Allowed
;
extern
bool
g_Alternate_Track_Posture
;
extern
bool
Segments_45_Only
;
extern
wxString
g_Shapes3DExtBuffer
;
extern
wxString
g_DocModulesFileName
;
...
...
pcbnew/pcbnew_id.h
View file @
39476ccd
...
...
@@ -101,6 +101,7 @@ enum pcbnew_ids
ID_POPUP_PCB_END_TRACK
,
ID_POPUP_PCB_PLACE_VIA
,
ID_POPUP_PCB_PLACE_MICROVIA
,
ID_POPUP_PCB_SWITCH_TRACK_POSTURE
,
ID_POPUP_PCB_IMPORT_PAD_SETTINGS
,
ID_POPUP_PCB_EXPORT_PAD_SETTINGS
,
...
...
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