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
aa5e1cd0
Commit
aa5e1cd0
authored
Jun 12, 2007
by
lifekidyeaa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* backspace should not be allowed to delete modules (in order to
re-insert them, you may have to edit the .brd file directly)
parent
3c7846db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
edit.cpp
pcbnew/edit.cpp
+1
-0
hotkeys.cpp
pcbnew/hotkeys.cpp
+5
-2
No files found.
pcbnew/edit.cpp
View file @
aa5e1cd0
...
@@ -1365,6 +1365,7 @@ void WinEDA_PcbFrame::SwitchLayer(wxDC *DC, int layer)
...
@@ -1365,6 +1365,7 @@ void WinEDA_PcbFrame::SwitchLayer(wxDC *DC, int layer)
Other_Layer_Route
(
(
TRACK
*
)
GetScreen
()
->
m_CurrentItem
,
DC
);
Other_Layer_Route
(
(
TRACK
*
)
GetScreen
()
->
m_CurrentItem
,
DC
);
}
}
}
}
GetScreen
()
->
m_Active_Layer
=
layer
;
GetScreen
()
->
m_Active_Layer
=
layer
;
if
(
DisplayOpt
.
ContrastModeDisplay
)
if
(
DisplayOpt
.
ContrastModeDisplay
)
...
...
pcbnew/hotkeys.cpp
View file @
aa5e1cd0
...
@@ -46,7 +46,7 @@ MODULE* module = NULL;
...
@@ -46,7 +46,7 @@ MODULE* module = NULL;
case
WXK_NUMPAD_DELETE
:
case
WXK_NUMPAD_DELETE
:
OnHotkeyDeleteItem
(
DC
,
DrawStruct
);
OnHotkeyDeleteItem
(
DC
,
DrawStruct
);
break
;
break
;
case
WXK_BACK
:{
case
WXK_BACK
:{
if
(
m_ID_current_state
==
ID_TRACK_BUTT
&&
if
(
m_ID_current_state
==
ID_TRACK_BUTT
&&
GetScreen
()
->
m_Active_Layer
<=
CMP_N
){
GetScreen
()
->
m_Active_Layer
<=
CMP_N
){
bool
ItemFree
=
(
GetScreen
()
->
m_CurrentItem
==
NULL
)
||
bool
ItemFree
=
(
GetScreen
()
->
m_CurrentItem
==
NULL
)
||
...
@@ -54,7 +54,9 @@ MODULE* module = NULL;
...
@@ -54,7 +54,9 @@ MODULE* module = NULL;
if
(
ItemFree
){
if
(
ItemFree
){
//no track is currently being edited - select a segment and remove it.
//no track is currently being edited - select a segment and remove it.
DrawStruct
=
PcbGeneralLocateAndDisplay
();
DrawStruct
=
PcbGeneralLocateAndDisplay
();
if
(
DrawStruct
)
//don't let backspace delete modules!!
if
(
DrawStruct
&&
(
DrawStruct
->
m_StructType
==
TYPETRACK
||
DrawStruct
->
m_StructType
==
TYPEVIA
))
Delete_Segment
(
DC
,
(
TRACK
*
)
DrawStruct
);
Delete_Segment
(
DC
,
(
TRACK
*
)
DrawStruct
);
GetScreen
()
->
SetModify
();
GetScreen
()
->
SetModify
();
}
}
...
@@ -217,6 +219,7 @@ bool ItemFree = (GetScreen()->m_CurrentItem == NULL ) ||
...
@@ -217,6 +219,7 @@ bool ItemFree = (GetScreen()->m_CurrentItem == NULL ) ||
{
{
MODULE
*
module
=
Locate_Prefered_Module
(
m_Pcb
,
CURSEUR_ON_GRILLE
);
MODULE
*
module
=
Locate_Prefered_Module
(
m_Pcb
,
CURSEUR_ON_GRILLE
);
if
(
module
==
NULL
)
return
FALSE
;
if
(
module
==
NULL
)
return
FALSE
;
if
(
!
IsOK
(
this
,
_
(
"Delete module?"
))
)
return
FALSE
;
RemoveStruct
(
module
,
DC
);
RemoveStruct
(
module
,
DC
);
}
}
else
return
FALSE
;
else
return
FALSE
;
...
...
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