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
8658d906
Commit
8658d906
authored
Sep 06, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some more spots where the GAL refresh was required.
parent
d213a260
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
12 deletions
+19
-12
drawframe.cpp
common/drawframe.cpp
+11
-4
view.h
include/view/view.h
+6
-1
class_pcb_layer_widget.cpp
pcbnew/class_pcb_layer_widget.cpp
+2
-7
No files found.
common/drawframe.cpp
View file @
8658d906
...
...
@@ -234,8 +234,12 @@ void EDA_DRAW_FRAME::SkipNextLeftButtonReleaseEvent()
void
EDA_DRAW_FRAME
::
OnToggleGridState
(
wxCommandEvent
&
aEvent
)
{
SetGridVisibility
(
!
IsGridVisible
()
);
if
(
m_galCanvasActive
)
{
m_galCanvas
->
GetGAL
()
->
SetGridVisibility
(
IsGridVisible
()
);
m_galCanvas
->
GetView
()
->
MarkTargetDirty
(
KiGfx
::
TARGET_NONCACHED
);
}
RefreshCanvas
();
}
...
...
@@ -392,11 +396,12 @@ void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event )
if
(
m_galCanvasActive
)
{
KiGfx
::
GAL
*
gal
=
m_galCanvas
->
GetGAL
();
gal
->
SetGridSize
(
VECTOR2D
(
screen
->
GetGrid
().
m_Size
.
x
,
screen
->
GetGrid
().
m_Size
.
y
)
);
m_galCanvas
->
GetGAL
()
->
SetGridSize
(
VECTOR2D
(
screen
->
GetGrid
().
m_Size
.
x
,
screen
->
GetGrid
().
m_Size
.
y
)
);
m_galCanvas
->
GetView
()
->
MarkTargetDirty
(
KiGfx
::
TARGET_NONCACHED
);
}
Refresh
();
Refresh
Canvas
();
}
...
...
@@ -1011,6 +1016,8 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable )
m_auimgr
.
GetPane
(
wxT
(
"DrawFrameGal"
)
).
Show
(
aEnable
);
m_auimgr
.
Update
();
m_galCanvas
->
SetFocus
();
m_galCanvasActive
=
aEnable
;
if
(
aEnable
)
m_galCanvas
->
SetFocus
();
}
include/view/view.h
View file @
8658d906
...
...
@@ -267,8 +267,13 @@ public:
*/
inline
void
SetLayerVisible
(
int
aLayer
,
bool
aVisible
=
true
)
{
if
(
m_layers
[
aLayer
].
enabled
!=
aVisible
)
{
// Target has to be redrawn after changing its visibility
MarkTargetDirty
(
m_layers
[
aLayer
].
target
);
m_layers
[
aLayer
].
enabled
=
aVisible
;
}
}
/**
* Function IsLayerVisible()
...
...
pcbnew/class_pcb_layer_widget.cpp
View file @
8658d906
...
...
@@ -393,7 +393,7 @@ void PCB_LAYER_WIDGET::OnLayerVisible( LAYER_NUM aLayer, bool isVisible, bool is
brd
->
SetVisibleLayers
(
visibleLayers
);
EDA_DRAW_PANEL_GAL
*
galCanvas
=
myframe
->
GetGalCanvas
();
EDA_DRAW_PANEL_GAL
*
galCanvas
=
myframe
->
GetGalCanvas
();
if
(
galCanvas
)
{
KiGfx
::
VIEW
*
view
=
galCanvas
->
GetView
();
...
...
@@ -401,12 +401,7 @@ void PCB_LAYER_WIDGET::OnLayerVisible( LAYER_NUM aLayer, bool isVisible, bool is
}
if
(
isFinal
)
{
if
(
myframe
->
IsGalCanvasActive
()
)
galCanvas
->
Refresh
();
else
myframe
->
RefreshCanvas
();
}
}
void
PCB_LAYER_WIDGET
::
OnRenderColorChange
(
int
aId
,
EDA_COLOR_T
aColor
)
...
...
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