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
87225998
Commit
87225998
authored
Apr 30, 2015
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CONDITIONAL_MENU supports separators and ordering.
parent
958046dd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
10 deletions
+13
-10
pcb_editor_control.cpp
pcbnew/tools/pcb_editor_control.cpp
+1
-1
placement_tool.cpp
pcbnew/tools/placement_tool.cpp
+2
-1
selection_tool.cpp
pcbnew/tools/selection_tool.cpp
+10
-8
No files found.
pcbnew/tools/pcb_editor_control.cpp
View file @
87225998
...
...
@@ -74,7 +74,7 @@ bool PCB_EDITOR_CONTROL::Init()
if
(
selTool
)
{
selTool
->
GetMenu
().
AddMenu
(
new
ZONE_CONTEXT_MENU
,
_
(
"Zones"
),
selTool
->
GetMenu
().
AddMenu
(
new
ZONE_CONTEXT_MENU
,
_
(
"Zones"
),
false
,
SELECTION_CONDITIONS
::
OnlyType
(
PCB_ZONE_AREA_T
)
);
}
...
...
pcbnew/tools/placement_tool.cpp
View file @
87225998
...
...
@@ -63,7 +63,8 @@ bool PLACEMENT_TOOL::Init()
menu
->
AppendSeparator
();
menu
->
Add
(
COMMON_ACTIONS
::
distributeHorizontally
);
menu
->
Add
(
COMMON_ACTIONS
::
distributeVertically
);
m_selectionTool
->
GetMenu
().
AddMenu
(
menu
,
_
(
"Align/distribute"
),
SELECTION_CONDITIONS
::
MoreThan
(
1
)
);
m_selectionTool
->
GetMenu
().
AddMenu
(
menu
,
_
(
"Align/distribute"
),
false
,
SELECTION_CONDITIONS
::
MoreThan
(
1
)
);
return
true
;
}
...
...
pcbnew/tools/selection_tool.cpp
View file @
87225998
...
...
@@ -85,19 +85,21 @@ bool SELECTION_TOOL::Init()
{
m_selection
.
group
=
new
KIGFX
::
VIEW_GROUP
;
m_menu
.
AddMenu
(
new
SELECT_MENU
,
_
(
"Select..."
),
m_menu
.
AddMenu
(
new
SELECT_MENU
,
_
(
"Select..."
),
false
,
(
SELECTION_CONDITION
)
SELECTION_CONDITIONS
::
OnlyConnectedItems
&&
SELECTION_CONDITIONS
::
Count
(
1
)
);
m_menu
.
AddItem
(
COMMON_ACTIONS
::
zoomCenter
);
m_menu
.
AddItem
(
COMMON_ACTIONS
::
zoomIn
);
m_menu
.
AddItem
(
COMMON_ACTIONS
::
zoomOut
);
m_menu
.
AddItem
(
COMMON_ACTIONS
::
zoomFitScreen
);
m_menu
.
AddSeparator
(
SELECTION_CONDITIONS
::
ShowAlways
,
1000
);
m_menu
.
AddMenu
(
new
ZOOM_MENU
(
getEditFrame
<
PCB_BASE_FRAME
>
()
),
"Zoom"
);
m_menu
.
AddMenu
(
new
GRID_MENU
(
getEditFrame
<
PCB_BASE_FRAME
>
()
),
"Grid"
);
m_menu
.
AddItem
(
COMMON_ACTIONS
::
zoomCenter
,
SELECTION_CONDITIONS
::
ShowAlways
,
1000
);
m_menu
.
AddItem
(
COMMON_ACTIONS
::
zoomIn
,
SELECTION_CONDITIONS
::
ShowAlways
,
1000
);
m_menu
.
AddItem
(
COMMON_ACTIONS
::
zoomOut
,
SELECTION_CONDITIONS
::
ShowAlways
,
1000
);
m_menu
.
AddItem
(
COMMON_ACTIONS
::
zoomFitScreen
,
SELECTION_CONDITIONS
::
ShowAlways
,
1000
);
//m_menu.AddSeparator();
m_menu
.
AddMenu
(
new
ZOOM_MENU
(
getEditFrame
<
PCB_BASE_FRAME
>
()
),
"Zoom"
,
false
,
SELECTION_CONDITIONS
::
ShowAlways
,
1000
);
m_menu
.
AddMenu
(
new
GRID_MENU
(
getEditFrame
<
PCB_BASE_FRAME
>
()
),
"Grid"
,
false
,
SELECTION_CONDITIONS
::
ShowAlways
,
1000
);
return
true
;
}
...
...
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