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
180c72ef
Commit
180c72ef
authored
Jul 07, 2013
by
Maciej Sumiński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added possibility to change zoom using toolbar in GAL.
parent
d81a351c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
drawframe.cpp
common/drawframe.cpp
+15
-1
No files found.
common/drawframe.cpp
View file @
180c72ef
...
...
@@ -426,6 +426,20 @@ void EDA_DRAW_FRAME::OnSelectZoom( wxCommandEvent& event )
return
;
GetScreen
()
->
SetZoom
(
selectedZoom
);
if
(
m_galCanvasActive
)
{
// Apply computed view settings to GAL
KiGfx
::
VIEW
*
view
=
m_galCanvas
->
GetView
();
KiGfx
::
GAL
*
gal
=
m_galCanvas
->
GetGAL
();
double
zoomFactor
=
gal
->
GetWorldScale
()
/
gal
->
GetZoomFactor
();
double
zoom
=
1.0
/
(
zoomFactor
*
GetZoom
()
);
view
->
SetScale
(
zoom
);
m_galCanvas
->
Refresh
();
}
else
RedrawScreen
(
GetScreen
()
->
GetScrollCenterPosition
(),
false
);
}
}
...
...
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