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
282995ea
Commit
282995ea
authored
Aug 08, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed disambiguation menu issue.
parent
402f3c6f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10 additions
and
9 deletions
+10
-9
context_menu.cpp
common/tool/context_menu.cpp
+1
-1
tool_interactive.cpp
common/tool/tool_interactive.cpp
+1
-1
tool_manager.cpp
common/tool/tool_manager.cpp
+1
-1
context_menu.h
include/tool/context_menu.h
+0
-1
tool_manager.h
include/tool/tool_manager.h
+1
-1
selection_tool.cpp
pcbnew/tools/selection_tool.cpp
+4
-4
selection_tool.h
pcbnew/tools/selection_tool.h
+2
-0
No files found.
common/tool/context_menu.cpp
View file @
282995ea
...
...
@@ -37,7 +37,7 @@ public:
CMEventHandler
(
CONTEXT_MENU
*
aMenu
)
:
m_menu
(
aMenu
)
{};
void
onEvent
(
wxEvent
&
aEvent
)
void
onEvent
(
wxEvent
&
aEvent
)
{
TOOL_EVENT
evt
;
wxEventType
type
=
aEvent
.
GetEventType
();
...
...
common/tool/tool_interactive.cpp
View file @
282995ea
...
...
@@ -61,7 +61,7 @@ void TOOL_INTERACTIVE::Reset()
}
void
TOOL_INTERACTIVE
::
SetContextMenu
(
CONTEXT_MENU
*
aMenu
,
TOOL_ContextMenuTrigger
aTrigger
)
void
TOOL_INTERACTIVE
::
SetContextMenu
(
CONTEXT_MENU
*
aMenu
,
TOOL_ContextMenuTrigger
aTrigger
)
{
aMenu
->
setTool
(
this
);
m_toolMgr
->
ScheduleContextMenu
(
this
,
aMenu
,
aTrigger
);
...
...
common/tool/tool_manager.cpp
View file @
282995ea
...
...
@@ -68,7 +68,7 @@ TOOL_MANAGER::TOOL_MANAGER()
{
}
void
TOOL_MANAGER
::
RegisterTool
(
TOOL_BASE
*
aTool
)
void
TOOL_MANAGER
::
RegisterTool
(
TOOL_BASE
*
aTool
)
{
ToolState
*
st
=
new
ToolState
;
...
...
include/tool/context_menu.h
View file @
282995ea
...
...
@@ -40,7 +40,6 @@ class CONTEXT_MENU
{
public
:
CONTEXT_MENU
();
~
CONTEXT_MENU
();
...
...
include/tool/tool_manager.h
View file @
282995ea
...
...
@@ -156,7 +156,7 @@ class TOOL_MANAGER
TOOL_ContextMenuTrigger
aTrigger
);
private
:
void
dispatchInternal
(
TOOL_EVENT
&
aEvent
);
void
dispatchInternal
(
TOOL_EVENT
&
aEvent
);
struct
ToolState
;
typedef
std
::
pair
<
TOOL_EVENT_LIST
,
TOOL_STATE_FUNC
>
Transition
;
...
...
pcbnew/tools/selection_tool.cpp
View file @
282995ea
...
...
@@ -216,11 +216,11 @@ void SELECTION_TOOL::selectMultiple()
BOARD_ITEM
*
SELECTION_TOOL
::
disambiguationMenu
(
GENERAL_COLLECTOR
*
aCollector
)
{
CONTEXT_MENU
cmenu
;
OPT_TOOL_EVENT
evt
;
BOARD_ITEM
*
current
=
NULL
;
cmenu
.
SetTitle
(
_
(
"Clarify selection"
)
);
m_menu
.
reset
(
new
CONTEXT_MENU
()
);
m_menu
->
SetTitle
(
_
(
"Clarify selection"
)
);
int
limit
=
std
::
min
(
10
,
aCollector
->
GetCount
()
);
...
...
@@ -229,10 +229,10 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR *aCollector )
wxString
text
;
BOARD_ITEM
*
item
=
(
*
aCollector
)[
i
];
text
=
item
->
GetSelectMenuText
();
cmenu
.
Add
(
text
,
i
);
m_menu
->
Add
(
text
,
i
);
}
SetContextMenu
(
&
cmenu
,
CMENU_NOW
);
SetContextMenu
(
m_menu
.
get
()
,
CMENU_NOW
);
while
(
evt
=
Wait
()
)
{
...
...
pcbnew/tools/selection_tool.h
View file @
282995ea
...
...
@@ -26,6 +26,7 @@
#define __SELECTION_TOOL_H
#include <set>
#include <boost/shared_ptr.hpp>
#include <math/vector2d.h>
#include <tool/tool_interactive.h>
...
...
@@ -66,6 +67,7 @@ private:
std
::
set
<
BOARD_ITEM
*>
m_selectedItems
;
SELECTION_AREA
*
m_selArea
;
boost
::
shared_ptr
<
CONTEXT_MENU
>
m_menu
;
};
#endif
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