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
3dc9f295
Commit
3dc9f295
authored
Dec 20, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed cursor force position option.
parent
84c496e1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
13 deletions
+5
-13
tool_dispatcher.cpp
common/tool/tool_dispatcher.cpp
+1
-1
wx_view_controls.cpp
common/view/wx_view_controls.cpp
+0
-11
wx_view_controls.h
include/view/wx_view_controls.h
+4
-1
No files found.
common/tool/tool_dispatcher.cpp
View file @
3dc9f295
...
...
@@ -221,7 +221,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
// but changes in world coordinates (e.g. autopanning)
type
==
KIGFX
::
WX_VIEW_CONTROLS
::
EVT_REFRESH_MOUSE
)
{
VECTOR2D
screenPos
=
m_toolMgr
->
GetViewControls
()
->
Get
Cursor
Position
();
VECTOR2D
screenPos
=
m_toolMgr
->
GetViewControls
()
->
Get
Mouse
Position
();
VECTOR2D
pos
=
getView
()
->
ToWorld
(
screenPos
);
if
(
pos
!=
m_lastMousePos
||
type
==
KIGFX
::
WX_VIEW_CONTROLS
::
EVT_REFRESH_MOUSE
)
...
...
common/view/wx_view_controls.cpp
View file @
3dc9f295
...
...
@@ -83,9 +83,7 @@ void WX_VIEW_CONTROLS::onMotion( wxMouseEvent& aEvent )
bool
isAutoPanning
=
false
;
if
(
m_autoPanEnabled
)
{
isAutoPanning
=
handleAutoPanning
(
aEvent
);
}
if
(
!
isAutoPanning
&&
aEvent
.
Dragging
()
)
{
...
...
@@ -243,15 +241,6 @@ const VECTOR2D WX_VIEW_CONTROLS::GetMousePosition() const
}
const
VECTOR2D
WX_VIEW_CONTROLS
::
GetCursorPosition
()
const
{
if
(
m_snappingEnabled
)
return
m_view
->
GetGAL
()
->
GetGridPoint
(
GetMousePosition
()
);
else
return
GetMousePosition
();
}
bool
WX_VIEW_CONTROLS
::
handleAutoPanning
(
const
wxMouseEvent
&
aEvent
)
{
VECTOR2D
p
(
aEvent
.
GetX
(),
aEvent
.
GetY
()
);
...
...
include/view/wx_view_controls.h
View file @
3dc9f295
...
...
@@ -84,7 +84,10 @@ public:
const
VECTOR2D
GetMousePosition
()
const
;
/// @copydoc VIEW_CONTROLS::GetCursorPosition()
const
VECTOR2D
GetCursorPosition
()
const
;
const
VECTOR2D
GetCursorPosition
()
const
{
return
m_cursorPosition
;
}
/// Event that forces mouse move event in the dispatcher (eg. used in autopanning, when mouse
/// cursor does not move in screen coordinates, but does in world coordinates)
...
...
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