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
6379d806
Commit
6379d806
authored
Apr 30, 2015
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Zoom & grid menus for GAL canvases.
parent
06b978b8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
6 deletions
+30
-6
CMakeLists.txt
pcbnew/CMakeLists.txt
+3
-0
selection_tool.cpp
pcbnew/tools/selection_tool.cpp
+23
-5
selection_tool.h
pcbnew/tools/selection_tool.h
+4
-1
No files found.
pcbnew/CMakeLists.txt
View file @
6379d806
...
@@ -284,6 +284,9 @@ set( PCBNEW_CLASS_SRCS
...
@@ -284,6 +284,9 @@ set( PCBNEW_CLASS_SRCS
tools/common_actions.cpp
tools/common_actions.cpp
tools/grid_helper.cpp
tools/grid_helper.cpp
tools/tools_common.cpp
tools/tools_common.cpp
tools/grid_menu.cpp
tools/zoom_menu.cpp
)
)
set
(
PCBNEW_SRCS
${
PCBNEW_AUTOROUTER_SRCS
}
${
PCBNEW_CLASS_SRCS
}
${
PCBNEW_DIALOGS
}
)
set
(
PCBNEW_SRCS
${
PCBNEW_AUTOROUTER_SRCS
}
${
PCBNEW_CLASS_SRCS
}
${
PCBNEW_DIALOGS
}
)
...
...
pcbnew/tools/selection_tool.cpp
View file @
6379d806
...
@@ -51,6 +51,8 @@
...
@@ -51,6 +51,8 @@
#include "selection_tool.h"
#include "selection_tool.h"
#include "selection_area.h"
#include "selection_area.h"
#include "zoom_menu.h"
#include "grid_menu.h"
#include "bright_box.h"
#include "bright_box.h"
#include "common_actions.h"
#include "common_actions.h"
...
@@ -69,6 +71,18 @@ SELECTION_TOOL::SELECTION_TOOL() :
...
@@ -69,6 +71,18 @@ SELECTION_TOOL::SELECTION_TOOL() :
TOOL_INTERACTIVE
(
"pcbnew.InteractiveSelection"
),
TOOL_INTERACTIVE
(
"pcbnew.InteractiveSelection"
),
m_frame
(
NULL
),
m_additive
(
false
),
m_multiple
(
false
),
m_frame
(
NULL
),
m_additive
(
false
),
m_multiple
(
false
),
m_editModules
(
false
),
m_locked
(
true
)
m_editModules
(
false
),
m_locked
(
true
)
{
}
SELECTION_TOOL
::~
SELECTION_TOOL
()
{
delete
m_selArea
;
delete
m_selection
.
group
;
}
bool
SELECTION_TOOL
::
Init
()
{
{
m_selArea
=
new
SELECTION_AREA
;
m_selArea
=
new
SELECTION_AREA
;
m_selection
.
group
=
new
KIGFX
::
VIEW_GROUP
;
m_selection
.
group
=
new
KIGFX
::
VIEW_GROUP
;
...
@@ -76,13 +90,17 @@ SELECTION_TOOL::SELECTION_TOOL() :
...
@@ -76,13 +90,17 @@ SELECTION_TOOL::SELECTION_TOOL() :
AddSubMenu
(
new
SELECT_MENU
,
_
(
"Select..."
),
AddSubMenu
(
new
SELECT_MENU
,
_
(
"Select..."
),
(
SELECTION_CONDITION
)
SELECTION_CONDITIONS
::
OnlyConnectedItems
&&
(
SELECTION_CONDITION
)
SELECTION_CONDITIONS
::
OnlyConnectedItems
&&
SELECTION_CONDITIONS
::
Count
(
1
)
);
SELECTION_CONDITIONS
::
Count
(
1
)
);
}
AddMenuItem
(
COMMON_ACTIONS
::
zoomCenter
);
AddMenuItem
(
COMMON_ACTIONS
::
zoomIn
);
AddMenuItem
(
COMMON_ACTIONS
::
zoomOut
);
AddMenuItem
(
COMMON_ACTIONS
::
zoomFitScreen
);
SELECTION_TOOL
::~
SELECTION_TOOL
()
AddSubMenu
(
new
ZOOM_MENU
(
getEditFrame
<
PCB_BASE_FRAME
>
()
),
"Zoom"
);
{
delete
m_selArea
;
AddSubMenu
(
new
GRID_MENU
(
getEditFrame
<
PCB_BASE_FRAME
>
()
),
"Grid"
);
delete
m_selection
.
group
;
return
true
;
}
}
...
...
pcbnew/tools/selection_tool.h
View file @
6379d806
...
@@ -104,7 +104,10 @@ public:
...
@@ -104,7 +104,10 @@ public:
SELECTION_TOOL
();
SELECTION_TOOL
();
~
SELECTION_TOOL
();
~
SELECTION_TOOL
();
/// @copydoc TOOL_INTERACTIVE::Reset()
/// @copydoc TOOL_BASE::Init()
bool
Init
();
/// @copydoc TOOL_BASE::Reset()
void
Reset
(
RESET_REASON
aReason
);
void
Reset
(
RESET_REASON
aReason
);
/**
/**
...
...
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