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
40ccdd57
Commit
40ccdd57
authored
May 07, 2012
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Pcbnew markers in nanometer build with proper scaling factor. Use double in Zoom()
parent
fb9e1ea0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
6 deletions
+11
-6
drawpanel.cpp
common/drawpanel.cpp
+2
-2
zoom.cpp
common/zoom.cpp
+4
-1
class_drawpanel.h
include/class_drawpanel.h
+3
-2
class_marker_pcb.cpp
pcbnew/class_marker_pcb.cpp
+2
-1
No files found.
common/drawpanel.cpp
View file @
40ccdd57
...
...
@@ -207,13 +207,13 @@ void EDA_DRAW_PANEL::CrossHairOn( wxDC* DC )
}
int
EDA_DRAW_PANEL
::
GetZoom
()
double
EDA_DRAW_PANEL
::
GetZoom
()
{
return
GetScreen
()
->
GetZoom
();
}
void
EDA_DRAW_PANEL
::
SetZoom
(
int
zoom
)
void
EDA_DRAW_PANEL
::
SetZoom
(
double
zoom
)
{
GetScreen
()
->
SetZoom
(
zoom
);
}
...
...
common/zoom.cpp
View file @
40ccdd57
...
...
@@ -60,8 +60,11 @@ void EDA_DRAW_FRAME::Zoom_Automatique( bool aWarpPointer )
BASE_SCREEN
*
screen
=
GetScreen
();
// Set the best zoom and get center point.
double
bestzoom
=
BestZoom
();
// BestZoom() can compute an illegal zoom if the client window size
// is small, say because frame is not maximized. So use the clamping form
// of SetZoom():
double
bestzoom
=
BestZoom
();
screen
->
SetScalingFactor
(
bestzoom
);
if
(
screen
->
m_FirstRedraw
)
...
...
include/class_drawpanel.h
View file @
40ccdd57
...
...
@@ -243,8 +243,9 @@ public:
void
OnScrollWin
(
wxCommandEvent
&
event
);
void
OnScroll
(
wxScrollWinEvent
&
event
);
void
SetZoom
(
int
mode
);
int
GetZoom
();
void
SetZoom
(
double
mode
);
double
GetZoom
();
void
SetGrid
(
const
wxRealPoint
&
size
);
wxRealPoint
GetGrid
();
...
...
pcbnew/class_marker_pcb.cpp
View file @
40ccdd57
...
...
@@ -15,7 +15,8 @@
#include <layers_id_colors_and_visibility.h>
#define SCALING_FACTOR 30 // Adjust the actual size of markers, when using default shape
/// Adjust the actual size of markers, when using default shape
#define SCALING_FACTOR DMils2iu( 30 )
MARKER_PCB
::
MARKER_PCB
(
BOARD_ITEM
*
aParent
)
:
...
...
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