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
787415c2
Commit
787415c2
authored
Apr 30, 2015
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updating the user grid size on change in GAL.
parent
3e46f223
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
dialog_set_grid.cpp
pcbnew/dialogs/dialog_set_grid.cpp
+8
-6
pcbnew_control.cpp
pcbnew/tools/pcbnew_control.cpp
+6
-1
No files found.
pcbnew/dialogs/dialog_set_grid.cpp
View file @
787415c2
...
...
@@ -34,8 +34,10 @@
#include <pcbnew_id.h>
#include <dialog_set_grid_base.h>
#include <invoke_pcb_dialog.h>
#include <gal/graphics_abstraction_layer.h>
#include <class_draw_panel_gal.h>
#include <tool/tool_manager.h>
class
DIALOG_SET_GRID
:
public
DIALOG_SET_GRID_BASE
...
...
@@ -227,12 +229,12 @@ bool PCB_BASE_FRAME::InvokeDialogGrid()
if
(
screen
->
GetGridId
()
==
ID_POPUP_GRID_USER
)
screen
->
SetGrid
(
ID_POPUP_GRID_USER
);
if
(
IsGalCanvasActive
()
)
{
GetGalCanvas
()
->
GetGAL
()
->
SetGridSize
(
VECTOR2D
(
screen
->
GetGrid
().
m_Size
.
x
,
screen
->
GetGrid
().
m_Size
.
y
)
);
GetGalCanvas
()
->
GetView
()
->
MarkTargetDirty
(
KIGFX
::
TARGET_NONCACHED
);
}
// Notify GAL
TOOL_MANAGER
*
mgr
=
GetToolManager
();
if
(
mgr
&&
IsGalCanvasActive
()
)
mgr
->
RunAction
(
"common.Control.gridPreset"
,
true
,
ID_POPUP_GRID_USER
-
ID_POPUP_GRID_LEVEL_1000
);
m_canvas
->
Refresh
();
...
...
pcbnew/tools/pcbnew_control.cpp
View file @
787415c2
...
...
@@ -135,10 +135,15 @@ int PCBNEW_CONTROL::ZoomPreset( const TOOL_EVENT& aEvent )
m_frame
->
SetPresetZoom
(
idx
);
if
(
idx
==
0
)
if
(
idx
==
0
)
// Zoom Auto
{
return
ZoomFitScreen
(
aEvent
);
}
else
if
(
idx
<
0
||
idx
>=
zoomList
.
size
()
)
{
assert
(
false
);
return
0
;
}
double
selectedZoom
=
zoomList
[
idx
];
double
zoomFactor
=
gal
->
GetWorldScale
()
/
gal
->
GetZoomFactor
();
...
...
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