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
90dbf5a9
Commit
90dbf5a9
authored
Jul 09, 2011
by
Marco Mattila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Warp mouse pointer before redrawing. Helps with mouse wheel zooming.
parent
55f65292
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
zoom.cpp
common/zoom.cpp
+6
-5
No files found.
common/zoom.cpp
View file @
90dbf5a9
...
...
@@ -22,12 +22,12 @@ void EDA_DRAW_FRAME::RedrawScreen( const wxPoint& aCenterPoint, bool aWarpPointe
{
AdjustScrollBars
(
aCenterPoint
);
DrawPanel
->
Refresh
();
DrawPanel
->
Update
();
/* Move the mouse cursor to the on grid graphic cursor position */
// Move the mouse cursor to the on grid graphic cursor position
if
(
aWarpPointer
)
DrawPanel
->
MoveCursorToCrossHair
();
DrawPanel
->
Refresh
();
DrawPanel
->
Update
();
}
...
...
@@ -38,8 +38,10 @@ void EDA_DRAW_FRAME::Zoom_Automatique( bool aWarpPointer )
{
BASE_SCREEN
*
screen
=
GetScreen
();
screen
->
SetZoom
(
BestZoom
()
);
// Set the best zoom and get center point.
if
(
screen
->
m_FirstRedraw
)
screen
->
SetCrossHairPosition
(
screen
->
GetScrollCenterPosition
()
);
RedrawScreen
(
screen
->
GetScrollCenterPosition
(),
aWarpPointer
);
}
...
...
@@ -99,7 +101,6 @@ void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event )
center
=
screen
->
GetCrossHairPosition
();
// fall thru
case
ID_ZOOM_OUT
:
if
(
screen
->
SetNextZoom
()
)
RedrawScreen
(
center
,
zoom_at_cursor
);
...
...
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