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
a041ef9d
Commit
a041ef9d
authored
Mar 30, 2011
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Plain Diff
Workaround for zoom levels < 1 in eeschema, with wxMSW version < 2.9
parents
cfc3d6df
58c96471
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
8 deletions
+54
-8
build_version.cpp
common/build_version.cpp
+1
-1
libeditframe.cpp
eeschema/libeditframe.cpp
+11
-1
sch_screen.cpp
eeschema/sch_screen.cpp
+15
-0
schframe.cpp
eeschema/schframe.cpp
+14
-3
viewlib_frame.cpp
eeschema/viewlib_frame.cpp
+10
-0
install.nsi
packaging/windows/nsis/install.nsi
+1
-1
version.txt
version.txt
+2
-2
No files found.
common/build_version.cpp
View file @
a041ef9d
...
...
@@ -6,7 +6,7 @@
#endif
#ifndef KICAD_BUILD_VERSION
#define KICAD_BUILD_VERSION "(2011-03-
29
)"
#define KICAD_BUILD_VERSION "(2011-03-
30
)"
#endif
// uncomment this line only when creating a stable version
...
...
eeschema/libeditframe.cpp
View file @
a041ef9d
...
...
@@ -389,7 +389,17 @@ int LIB_EDIT_FRAME::BestZoom()
ii
=
wxRound
(
(
(
double
)
dx
/
(
double
)
size
.
x
)
*
(
double
)
GetScreen
()
->
m_ZoomScalar
);
jj
=
wxRound
(
(
(
double
)
dy
/
(
double
)
size
.
y
)
*
(
double
)
GetScreen
()
->
m_ZoomScalar
);
return
MAX
(
ii
+
1
,
jj
+
1
);
int
bestzoom
=
MAX
(
ii
+
1
,
jj
+
1
);
#if defined( __WINDOWS__ ) && !wxCHECK_VERSION(2, 9, 1)
/* This is a workaround: wxWidgets (wxMSW) before version 2.9 seems have
* problems with scale values < 1
* corresponding to values < GetScreen()->m_ZoomScalar
* So we keep bestzoom >= GetScreen()->m_ZoomScalar
*/
if
(
bestzoom
<
GetScreen
()
->
m_ZoomScalar
)
bestzoom
=
GetScreen
()
->
m_ZoomScalar
;
#endif
return
bestzoom
;
}
...
...
eeschema/sch_screen.cpp
View file @
a041ef9d
...
...
@@ -30,10 +30,25 @@
/* Default EESchema zoom values. Limited to 17 values to keep a decent size
* to menus
*/
#if defined( __WINDOWS__ ) && !wxCHECK_VERSION(2, 9, 1)
/* Please, note: wxWidgets (wxMSW) before version 2.9 seems have
* problems with scale values < 1
* because scale value is SchematicZoomList[x] / 10
* ( in fact is SchematicZoomList[x] / m_ZoomScalar )
* do not use values smaller than 10 without testing them under wxWidgets versions < 2.9
* value like 0.5 seems work
*/
static
int
SchematicZoomList
[]
=
{
5
,
10
,
15
,
20
,
30
,
40
,
60
,
80
,
120
,
160
,
230
,
320
,
480
,
640
,
800
,
1280
};
#else
static
int
SchematicZoomList
[]
=
{
5
,
7
,
10
,
15
,
20
,
30
,
40
,
60
,
80
,
120
,
160
,
230
,
320
,
480
,
640
,
800
,
1280
};
#endif
#define SCHEMATIC_ZOOM_LIST_CNT ( sizeof( SchematicZoomList ) / sizeof( int ) )
#define MM_TO_SCH_UNITS 1000.0 / 25.4 //schematic internal unites are mils
...
...
eeschema/schframe.cpp
View file @
a041ef9d
...
...
@@ -393,17 +393,28 @@ int SCH_EDIT_FRAME::BestZoom()
{
int
dx
,
dy
;
wxSize
size
;
double
zoom
;
dx
=
GetScreen
()
->
m_CurrentSheetDesc
->
m_Size
.
x
;
dy
=
GetScreen
()
->
m_CurrentSheetDesc
->
m_Size
.
y
;
size
=
DrawPanel
->
GetClientSize
();
zoom
=
MAX
(
(
double
)
dx
/
(
double
)
size
.
x
,
(
double
)
dy
/
(
double
)
size
.
y
);
int
ii
=
wxRound
(
(
double
)
dx
/
size
.
x
*
(
double
)
GetScreen
()
->
m_ZoomScalar
);
int
jj
=
wxRound
(
(
double
)
dx
/
size
.
x
*
(
double
)
GetScreen
()
->
m_ZoomScalar
);
int
bestzoom
=
MAX
(
ii
,
jj
);
GetScreen
()
->
SetScrollCenterPosition
(
wxPoint
(
dx
/
2
,
dy
/
2
)
);
return
wxRound
(
zoom
*
(
double
)
GetScreen
()
->
m_ZoomScalar
);
#if defined( __WINDOWS__ ) && !wxCHECK_VERSION(2, 9, 1)
/* This is a workaround: wxWidgets (wxMSW) before version 2.9 seems have
* problems with scale values < 1
* corresponding to values < GetScreen()->m_ZoomScalar
* So we keep bestzoom >= GetScreen()->m_ZoomScalar
*/
if
(
bestzoom
<
GetScreen
()
->
m_ZoomScalar
)
bestzoom
=
GetScreen
()
->
m_ZoomScalar
;
#endif
return
bestzoom
;
}
...
...
eeschema/viewlib_frame.cpp
View file @
a041ef9d
...
...
@@ -358,6 +358,16 @@ int LIB_VIEW_FRAME::BestZoom()
(
double
)
GetScreen
()
->
m_ZoomScalar
);
bestzoom
=
MAX
(
ii
,
jj
)
+
1
;
#if defined( __WINDOWS__ ) && !wxCHECK_VERSION(2, 9, 1)
/* This is a workaround: wxWidgets (wxMSW) before version 2.9 seems have
* problems with scale values < 1
* corresponding to values < GetScreen()->m_ZoomScalar
* So we keep bestzoom >= GetScreen()->m_ZoomScalar
*/
if
(
bestzoom
<
GetScreen
()
->
m_ZoomScalar
)
bestzoom
=
GetScreen
()
->
m_ZoomScalar
;
#endif
GetScreen
()
->
SetScrollCenterPosition
(
BoundaryBox
.
Centre
()
);
return
bestzoom
;
...
...
packaging/windows/nsis/install.nsi
View file @
a041ef9d
...
...
@@ -17,7 +17,7 @@
; General Product Description Definitions
!define PRODUCT_NAME "KiCad"
!define PRODUCT_VERSION "2011.03.
29
"
!define PRODUCT_VERSION "2011.03.
30
"
!define PRODUCT_WEB_SITE "http://iut-tice.ujf-grenoble.fr/kicad/"
!define SOURCEFORGE_WEB_SITE "http://kicad.sourceforge.net/"
!define COMPANY_NAME ""
...
...
version.txt
View file @
a041ef9d
release version:
2011 mar
29
2011 mar
30
files (.zip,.tgz):
kicad-2011-03-
29
kicad-2011-03-
30
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