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
aafdfd01
Commit
aafdfd01
authored
Feb 18, 2015
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disabled 'Duplicate' & 'Create array' for pads in the layout editor.
parent
9bed4814
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
7 deletions
+19
-7
class_board_item.h
include/class_board_item.h
+1
-1
edit.cpp
pcbnew/edit.cpp
+16
-4
common_actions.cpp
pcbnew/tools/common_actions.cpp
+2
-2
No files found.
include/class_board_item.h
View file @
aafdfd01
...
@@ -79,7 +79,7 @@ protected:
...
@@ -79,7 +79,7 @@ protected:
LAYER_ID
m_Layer
;
LAYER_ID
m_Layer
;
static
int
getTrailingInt
(
wxString
aStr
);
static
int
getTrailingInt
(
wxString
aStr
);
static
int
getNextNumberInSequence
(
std
::
set
<
int
>
aSeq
,
bool
aFillSequenceGaps
);
static
int
getNextNumberInSequence
(
std
::
set
<
int
>
aSeq
,
bool
aFillSequenceGaps
);
public
:
public
:
...
...
pcbnew/edit.cpp
View file @
aafdfd01
...
@@ -1531,11 +1531,16 @@ void PCB_EDIT_FRAME::moveExact()
...
@@ -1531,11 +1531,16 @@ void PCB_EDIT_FRAME::moveExact()
void
PCB_EDIT_FRAME
::
duplicateItem
(
bool
aIncrement
)
void
PCB_EDIT_FRAME
::
duplicateItem
(
bool
aIncrement
)
{
{
BOARD_ITEM
*
item
=
GetScreen
()
->
GetCurItem
();
BOARD_ITEM
*
item
=
GetScreen
()
->
GetCurItem
();
bool
editingModule
=
NULL
!=
dynamic_cast
<
FOOTPRINT_EDIT_FRAME
*>
(
this
);
int
move_cmd
=
0
;
int
move_cmd
=
0
;
BOARD_ITEM
*
new_item
=
GetBoard
()
->
DuplicateAndAddItem
(
if
(
item
->
Type
()
==
PCB_PAD_T
&&
!
editingModule
)
item
,
aIncrement
);
{
// If it is not the module editor, then duplicate the parent module instead
item
=
static_cast
<
MODULE
*>
(
item
)
->
GetParent
();
}
BOARD_ITEM
*
new_item
=
GetBoard
()
->
DuplicateAndAddItem
(
item
,
aIncrement
);
SaveCopyInUndoList
(
new_item
,
UR_NEW
);
SaveCopyInUndoList
(
new_item
,
UR_NEW
);
...
@@ -1595,6 +1600,7 @@ void PCB_BASE_EDIT_FRAME::createArray()
...
@@ -1595,6 +1600,7 @@ void PCB_BASE_EDIT_FRAME::createArray()
bool
editingModule
=
NULL
!=
dynamic_cast
<
FOOTPRINT_EDIT_FRAME
*>
(
this
);
bool
editingModule
=
NULL
!=
dynamic_cast
<
FOOTPRINT_EDIT_FRAME
*>
(
this
);
BOARD
*
board
=
GetBoard
();
BOARD
*
board
=
GetBoard
();
// Remember it is valid only in the module editor
MODULE
*
module
=
static_cast
<
MODULE
*>
(
item
->
GetParent
()
);
MODULE
*
module
=
static_cast
<
MODULE
*>
(
item
->
GetParent
()
);
DIALOG_CREATE_ARRAY
::
ARRAY_OPTIONS
*
array_opts
=
NULL
;
DIALOG_CREATE_ARRAY
::
ARRAY_OPTIONS
*
array_opts
=
NULL
;
...
@@ -1608,6 +1614,12 @@ void PCB_BASE_EDIT_FRAME::createArray()
...
@@ -1608,6 +1614,12 @@ void PCB_BASE_EDIT_FRAME::createArray()
{
{
PICKED_ITEMS_LIST
newItemsList
;
PICKED_ITEMS_LIST
newItemsList
;
if
(
item
->
Type
()
==
PCB_PAD_T
&&
!
editingModule
)
{
// If it is not the module editor, then duplicate the parent module instead
item
=
static_cast
<
MODULE
*>
(
item
)
->
GetParent
();
}
if
(
editingModule
)
if
(
editingModule
)
{
{
// modedit saves everything upfront
// modedit saves everything upfront
...
@@ -1631,7 +1643,7 @@ void PCB_BASE_EDIT_FRAME::createArray()
...
@@ -1631,7 +1643,7 @@ void PCB_BASE_EDIT_FRAME::createArray()
cachedString
=
text
->
GetText
();
cachedString
=
text
->
GetText
();
}
}
for
(
int
ptN
=
0
;
ptN
<
array_opts
->
GetArraySize
();
ptN
++
)
for
(
int
ptN
=
0
;
ptN
<
array_opts
->
GetArraySize
();
ptN
++
)
{
{
BOARD_ITEM
*
new_item
=
NULL
;
BOARD_ITEM
*
new_item
=
NULL
;
...
...
pcbnew/tools/common_actions.cpp
View file @
aafdfd01
...
@@ -56,7 +56,7 @@ TOOL_ACTION COMMON_ACTIONS::findDummy( "pcbnew.Find.Dummy", // only block the ho
...
@@ -56,7 +56,7 @@ TOOL_ACTION COMMON_ACTIONS::findDummy( "pcbnew.Find.Dummy", // only block the ho
AS_GLOBAL
,
MD_CTRL
+
int
(
'F'
)
);
AS_GLOBAL
,
MD_CTRL
+
int
(
'F'
)
);
TOOL_ACTION
COMMON_ACTIONS
::
findMove
(
"pcbnew.InteractiveSelection.FindMove"
,
TOOL_ACTION
COMMON_ACTIONS
::
findMove
(
"pcbnew.InteractiveSelection.FindMove"
,
AS_GLOBAL
,
'T'
);
AS_GLOBAL
,
'T'
);
// Edit tool actions
// Edit tool actions
...
@@ -77,7 +77,7 @@ TOOL_ACTION COMMON_ACTIONS::moveExact( "pcbnew.InteractiveEdit.moveExact",
...
@@ -77,7 +77,7 @@ TOOL_ACTION COMMON_ACTIONS::moveExact( "pcbnew.InteractiveEdit.moveExact",
"Move Exactly..."
,
"Moves the selected item(s) by an exact amount"
);
"Move Exactly..."
,
"Moves the selected item(s) by an exact amount"
);
TOOL_ACTION
COMMON_ACTIONS
::
createArray
(
"pcbnew.InteractiveEdit.createArray"
,
TOOL_ACTION
COMMON_ACTIONS
::
createArray
(
"pcbnew.InteractiveEdit.createArray"
,
AS_GLOBAL
,
MD_CTRL
+
int
(
'N'
),
AS_GLOBAL
,
MD_CTRL
+
int
(
'N'
),
"Create array"
,
"Create array"
,
AF_ACTIVATE
);
"Create array"
,
"Create array"
,
AF_ACTIVATE
);
TOOL_ACTION
COMMON_ACTIONS
::
rotate
(
"pcbnew.InteractiveEdit.rotate"
,
TOOL_ACTION
COMMON_ACTIONS
::
rotate
(
"pcbnew.InteractiveEdit.rotate"
,
...
...
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