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
1df31338
Commit
1df31338
authored
Dec 08, 2014
by
Nick Østergaard
Committed by
Maciej Suminski
Dec 08, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Shortcut for fill all and unfill all zones for GAL.
parent
834d5441
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
1 deletion
+27
-1
common_actions.cpp
pcbnew/tools/common_actions.cpp
+5
-1
common_actions.h
pcbnew/tools/common_actions.h
+1
-0
pcb_editor_control.cpp
pcbnew/tools/pcb_editor_control.cpp
+20
-0
pcb_editor_control.h
pcbnew/tools/pcb_editor_control.h
+1
-0
No files found.
pcbnew/tools/common_actions.cpp
View file @
1df31338
...
@@ -308,13 +308,17 @@ TOOL_ACTION COMMON_ACTIONS::zoneFill( "pcbnew.EditorControl.zoneFill",
...
@@ -308,13 +308,17 @@ TOOL_ACTION COMMON_ACTIONS::zoneFill( "pcbnew.EditorControl.zoneFill",
"Fill"
,
"Fill zone(s)"
);
"Fill"
,
"Fill zone(s)"
);
TOOL_ACTION
COMMON_ACTIONS
::
zoneFillAll
(
"pcbnew.EditorControl.zoneFillAll"
,
TOOL_ACTION
COMMON_ACTIONS
::
zoneFillAll
(
"pcbnew.EditorControl.zoneFillAll"
,
AS_GLOBAL
,
0
,
AS_GLOBAL
,
int
(
'B'
)
,
"Fill all"
,
"Fill all zones"
);
"Fill all"
,
"Fill all zones"
);
TOOL_ACTION
COMMON_ACTIONS
::
zoneUnfill
(
"pcbnew.EditorControl.zoneUnfill"
,
TOOL_ACTION
COMMON_ACTIONS
::
zoneUnfill
(
"pcbnew.EditorControl.zoneUnfill"
,
AS_GLOBAL
,
0
,
AS_GLOBAL
,
0
,
"Unfill"
,
"Unfill zone(s)"
);
"Unfill"
,
"Unfill zone(s)"
);
TOOL_ACTION
COMMON_ACTIONS
::
zoneUnfillAll
(
"pcbnew.EditorControl.zoneUnfillAll"
,
AS_GLOBAL
,
int
(
'N'
),
"Unfill all"
,
"Unfill all zones"
);
// Module editor tools
// Module editor tools
TOOL_ACTION
COMMON_ACTIONS
::
placePad
(
"pcbnew.ModuleEditor.placePad"
,
TOOL_ACTION
COMMON_ACTIONS
::
placePad
(
"pcbnew.ModuleEditor.placePad"
,
...
...
pcbnew/tools/common_actions.h
View file @
1df31338
...
@@ -195,6 +195,7 @@ public:
...
@@ -195,6 +195,7 @@ public:
static
TOOL_ACTION
zoneFill
;
static
TOOL_ACTION
zoneFill
;
static
TOOL_ACTION
zoneFillAll
;
static
TOOL_ACTION
zoneFillAll
;
static
TOOL_ACTION
zoneUnfill
;
static
TOOL_ACTION
zoneUnfill
;
static
TOOL_ACTION
zoneUnfillAll
;
// Module editor tools
// Module editor tools
/// Activation of the drawing tool (placing a PAD)
/// Activation of the drawing tool (placing a PAD)
...
...
pcbnew/tools/pcb_editor_control.cpp
View file @
1df31338
...
@@ -41,6 +41,7 @@ public:
...
@@ -41,6 +41,7 @@ public:
Add
(
COMMON_ACTIONS
::
zoneFill
);
Add
(
COMMON_ACTIONS
::
zoneFill
);
Add
(
COMMON_ACTIONS
::
zoneFillAll
);
Add
(
COMMON_ACTIONS
::
zoneFillAll
);
Add
(
COMMON_ACTIONS
::
zoneUnfill
);
Add
(
COMMON_ACTIONS
::
zoneUnfill
);
Add
(
COMMON_ACTIONS
::
zoneUnfillAll
);
}
}
};
};
...
@@ -219,6 +220,24 @@ int PCB_EDITOR_CONTROL::ZoneUnfill( TOOL_EVENT& aEvent )
...
@@ -219,6 +220,24 @@ int PCB_EDITOR_CONTROL::ZoneUnfill( TOOL_EVENT& aEvent )
}
}
int
PCB_EDITOR_CONTROL
::
ZoneUnfillAll
(
TOOL_EVENT
&
aEvent
)
{
BOARD
*
board
=
getModel
<
BOARD
>
();
for
(
int
i
=
0
;
i
<
board
->
GetAreaCount
();
++
i
)
{
ZONE_CONTAINER
*
zone
=
board
->
GetArea
(
i
);
zone
->
SetIsFilled
(
false
);
zone
->
ClearFilledPolysList
();
zone
->
ViewUpdate
();
}
setTransitions
();
return
0
;
}
void
PCB_EDITOR_CONTROL
::
setTransitions
()
void
PCB_EDITOR_CONTROL
::
setTransitions
()
{
{
// Track & via size control
// Track & via size control
...
@@ -231,4 +250,5 @@ void PCB_EDITOR_CONTROL::setTransitions()
...
@@ -231,4 +250,5 @@ void PCB_EDITOR_CONTROL::setTransitions()
Go
(
&
PCB_EDITOR_CONTROL
::
ZoneFill
,
COMMON_ACTIONS
::
zoneFill
.
MakeEvent
()
);
Go
(
&
PCB_EDITOR_CONTROL
::
ZoneFill
,
COMMON_ACTIONS
::
zoneFill
.
MakeEvent
()
);
Go
(
&
PCB_EDITOR_CONTROL
::
ZoneFillAll
,
COMMON_ACTIONS
::
zoneFillAll
.
MakeEvent
()
);
Go
(
&
PCB_EDITOR_CONTROL
::
ZoneFillAll
,
COMMON_ACTIONS
::
zoneFillAll
.
MakeEvent
()
);
Go
(
&
PCB_EDITOR_CONTROL
::
ZoneUnfill
,
COMMON_ACTIONS
::
zoneUnfill
.
MakeEvent
()
);
Go
(
&
PCB_EDITOR_CONTROL
::
ZoneUnfill
,
COMMON_ACTIONS
::
zoneUnfill
.
MakeEvent
()
);
Go
(
&
PCB_EDITOR_CONTROL
::
ZoneUnfillAll
,
COMMON_ACTIONS
::
zoneUnfillAll
.
MakeEvent
()
);
}
}
pcbnew/tools/pcb_editor_control.h
View file @
1df31338
...
@@ -55,6 +55,7 @@ public:
...
@@ -55,6 +55,7 @@ public:
int
ZoneFill
(
TOOL_EVENT
&
aEvent
);
int
ZoneFill
(
TOOL_EVENT
&
aEvent
);
int
ZoneFillAll
(
TOOL_EVENT
&
aEvent
);
int
ZoneFillAll
(
TOOL_EVENT
&
aEvent
);
int
ZoneUnfill
(
TOOL_EVENT
&
aEvent
);
int
ZoneUnfill
(
TOOL_EVENT
&
aEvent
);
int
ZoneUnfillAll
(
TOOL_EVENT
&
aEvent
);
private
:
private
:
///> Sets up handlers for various events.
///> Sets up handlers for various events.
...
...
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