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
0dc587e2
Commit
0dc587e2
authored
Sep 09, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tools are enabled to switch snapping cursor to grid.
parent
dbbe628b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
tool_dispatcher.cpp
common/tool/tool_dispatcher.cpp
+6
-3
No files found.
common/tool/tool_dispatcher.cpp
View file @
0dc587e2
...
...
@@ -31,6 +31,7 @@
#include <tool/tool_manager.h>
#include <tool/tool_dispatcher.h>
#include <view/view.h>
#include <view/view_controls.h>
#include <class_drawpanel_gal.h>
...
...
@@ -199,7 +200,7 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti
void
TOOL_DISPATCHER
::
DispatchWxEvent
(
wxEvent
&
aEvent
)
{
bool
motion
=
false
,
buttonEvents
=
false
;
VECTOR2D
pos
;
VECTOR2D
pos
,
screenPos
;
optional
<
TOOL_EVENT
>
evt
;
int
type
=
aEvent
.
GetEventType
();
...
...
@@ -210,8 +211,9 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
type
==
wxEVT_MIDDLE_DOWN
||
type
==
wxEVT_MIDDLE_UP
||
type
==
wxEVT_RIGHT_DOWN
||
type
==
wxEVT_RIGHT_UP
)
{
wxMouseEvent
*
me
=
static_cast
<
wxMouseEvent
*>
(
&
aEvent
);
pos
=
getView
()
->
ToWorld
(
VECTOR2D
(
me
->
GetX
(),
me
->
GetY
()
)
);
screenPos
=
m_toolMgr
->
GetViewControls
()
->
GetCursorPosition
();
pos
=
getView
()
->
ToWorld
(
screenPos
);
if
(
pos
!=
m_lastMousePos
)
{
motion
=
true
;
...
...
@@ -271,3 +273,4 @@ void TOOL_DISPATCHER::DispatchWxCommand( wxCommandEvent& aEvent )
if
(
activateTool
&&
m_editFrame
->
IsGalCanvasActive
()
)
m_toolMgr
->
InvokeTool
(
toolName
);
}
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