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
3fc45fb7
Commit
3fc45fb7
authored
Apr 10, 2015
by
Chris Pavlina
Committed by
Wayne Stambaugh
Apr 10, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug where user defined grid change does not update in GAL canvas. (fixes lp:146098)
parent
148ba430
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
8 deletions
+21
-8
dialog_set_grid.cpp
pcbnew/dialogs/dialog_set_grid.cpp
+16
-5
dialog_set_grid_base.cpp
pcbnew/dialogs/dialog_set_grid_base.cpp
+1
-1
dialog_set_grid_base.fbp
pcbnew/dialogs/dialog_set_grid_base.fbp
+3
-1
dialog_set_grid_base.h
pcbnew/dialogs/dialog_set_grid_base.h
+1
-1
No files found.
pcbnew/dialogs/dialog_set_grid.cpp
View file @
3fc45fb7
...
...
@@ -5,7 +5,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-201
3
KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-201
5
KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
...
...
@@ -34,6 +34,8 @@
#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>
class
DIALOG_SET_GRID
:
public
DIALOG_SET_GRID_BASE
...
...
@@ -155,7 +157,7 @@ void DIALOG_SET_GRID::setGridOrigin( const wxPoint& grid )
}
void
DIALOG_SET_GRID
::
setGridForFastSwitching
(
const
wxArrayString
&
aGrids
,
int
aGrid1
,
int
aGrid2
)
void
DIALOG_SET_GRID
::
setGridForFastSwitching
(
const
wxArrayString
&
aGrids
,
int
aGrid1
,
int
aGrid2
)
{
m_comboBoxGrid1
->
Append
(
aGrids
);
m_comboBoxGrid2
->
Append
(
aGrids
);
...
...
@@ -216,12 +218,21 @@ bool PCB_BASE_FRAME::InvokeDialogGrid()
SetGridOrigin
(
grid_origin
);
GetScreen
()
->
AddGrid
(
m_UserGridSize
,
m_UserGridUnit
,
ID_POPUP_GRID_USER
);
BASE_SCREEN
*
screen
=
GetScreen
();
screen
->
AddGrid
(
m_UserGridSize
,
m_UserGridUnit
,
ID_POPUP_GRID_USER
);
// If the user grid is the current option, recall SetGrid()
// to force new values put in list as current grid value
if
(
GetScreen
()
->
GetGridId
()
==
ID_POPUP_GRID_USER
)
GetScreen
()
->
SetGrid
(
ID_POPUP_GRID_USER
);
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
);
}
m_canvas
->
Refresh
();
...
...
pcbnew/dialogs/dialog_set_grid_base.cpp
View file @
3fc45fb7
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Oct 8 2012
)
// C++ code generated with wxFormBuilder (version
Mar 13 2015
)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
pcbnew/dialogs/dialog_set_grid_base.fbp
View file @
3fc45fb7
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion
major=
"1"
minor=
"1
1
"
/>
<FileVersion
major=
"1"
minor=
"1
3
"
/>
<object
class=
"Project"
expanded=
"1"
>
<property
name=
"class_decoration"
></property>
<property
name=
"code_generation"
>
C++
</property>
...
...
@@ -20,8 +20,10 @@
<property
name=
"path"
>
.
</property>
<property
name=
"precompiled_header"
></property>
<property
name=
"relative_path"
>
1
</property>
<property
name=
"skip_lua_events"
>
1
</property>
<property
name=
"skip_php_events"
>
1
</property>
<property
name=
"skip_python_events"
>
1
</property>
<property
name=
"ui_table"
>
UI
</property>
<property
name=
"use_enum"
>
0
</property>
<property
name=
"use_microsoft_bom"
>
0
</property>
<object
class=
"Dialog"
expanded=
"1"
>
...
...
pcbnew/dialogs/dialog_set_grid_base.h
View file @
3fc45fb7
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Oct 8 2012
)
// C++ code generated with wxFormBuilder (version
Mar 13 2015
)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
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