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
c0a96141
Commit
c0a96141
authored
Jul 09, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added AF_NOTIFY flag for TOOL_ACTIONs.
parent
b2d07373
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
4 deletions
+15
-4
tool_manager.cpp
common/tool/tool_manager.cpp
+2
-2
tool_action.h
include/tool/tool_action.h
+10
-0
tool_event.h
include/tool/tool_event.h
+2
-1
common_actions.cpp
pcbnew/tools/common_actions.cpp
+1
-1
No files found.
common/tool/tool_manager.cpp
View file @
c0a96141
...
...
@@ -448,8 +448,8 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent )
{
if
(
st
->
waitEvents
.
Matches
(
aEvent
)
)
{
// By default,
already processed events are not
passed further
m_passEvent
=
false
;
// By default,
only messages are
passed further
m_passEvent
=
(
aEvent
.
m_category
==
TC_MESSAGE
)
;
// got matching event? clear wait list and wake up the coroutine
st
->
wakeupEvent
=
aEvent
;
...
...
include/tool/tool_action.h
View file @
c0a96141
...
...
@@ -148,6 +148,8 @@ public:
{
if
(
IsActivation
()
)
return
TOOL_EVENT
(
TC_COMMAND
,
TA_ACTIVATE
,
m_name
,
m_scope
);
else
if
(
IsNotification
()
)
return
TOOL_EVENT
(
TC_MESSAGE
,
TA_ANY
,
m_name
,
m_scope
);
else
return
TOOL_EVENT
(
TC_COMMAND
,
TA_ACTION
,
m_name
,
m_scope
);
}
...
...
@@ -192,6 +194,14 @@ public:
return
m_flags
&
AF_ACTIVATE
;
}
/**
* Returns true if the action is a notification.
*/
bool
IsNotification
()
const
{
return
m_flags
&
AF_NOTIFY
;
}
private
:
friend
class
ACTION_MANAGER
;
...
...
include/tool/tool_event.h
View file @
c0a96141
...
...
@@ -130,7 +130,8 @@ enum TOOL_ACTION_SCOPE
enum
TOOL_ACTION_FLAGS
{
AF_NONE
=
0
,
AF_ACTIVATE
=
1
///> Action activates a tool
AF_ACTIVATE
=
1
,
///> Action activates a tool
AF_NOTIFY
=
2
///> Action is a notification (it is by default passed to all tools)
};
/// Defines when a context menu is opened.
...
...
pcbnew/tools/common_actions.cpp
View file @
c0a96141
...
...
@@ -264,7 +264,7 @@ TOOL_ACTION COMMON_ACTIONS::viaSizeDec( "pcbnew.EditorControl.viaSizeDec",
TOOL_ACTION
COMMON_ACTIONS
::
trackViaSizeChanged
(
"pcbnew.EditorControl.trackViaSizeChanged"
,
AS_GLOBAL
,
0
,
""
,
""
);
""
,
""
,
AF_NOTIFY
);
// Module editor tools
...
...
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