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
5447bb59
Commit
5447bb59
authored
Jan 25, 2015
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix: Pcbnew (Windows) crashes using selection tool in OpenGL or Cairo
parent
f0a52644
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
view.h
include/view/view.h
+15
-0
pcb_draw_panel_gal.cpp
pcbnew/pcb_draw_panel_gal.cpp
+8
-0
No files found.
include/view/view.h
View file @
5447bb59
...
@@ -292,6 +292,8 @@ public:
...
@@ -292,6 +292,8 @@ public:
*/
*/
inline
void
SetLayerVisible
(
int
aLayer
,
bool
aVisible
=
true
)
inline
void
SetLayerVisible
(
int
aLayer
,
bool
aVisible
=
true
)
{
{
wxASSERT
(
aLayer
<
(
int
)
m_layers
.
size
()
);
if
(
m_layers
[
aLayer
].
visible
!=
aVisible
)
if
(
m_layers
[
aLayer
].
visible
!=
aVisible
)
{
{
// Target has to be redrawn after changing its visibility
// Target has to be redrawn after changing its visibility
...
@@ -307,9 +309,18 @@ public:
...
@@ -307,9 +309,18 @@ public:
*/
*/
inline
bool
IsLayerVisible
(
int
aLayer
)
const
inline
bool
IsLayerVisible
(
int
aLayer
)
const
{
{
wxASSERT
(
aLayer
<
(
int
)
m_layers
.
size
()
);
return
m_layers
.
at
(
aLayer
).
visible
;
return
m_layers
.
at
(
aLayer
).
visible
;
}
}
inline
void
SetLayerDisplayOnly
(
int
aLayer
,
bool
aDisplayOnly
=
true
)
{
wxASSERT
(
aLayer
<
(
int
)
m_layers
.
size
()
);
m_layers
[
aLayer
].
displayOnly
=
aDisplayOnly
;
}
/**
/**
* Function SetLayerTarget()
* Function SetLayerTarget()
* Changes the rendering target for a particular layer.
* Changes the rendering target for a particular layer.
...
@@ -318,6 +329,8 @@ public:
...
@@ -318,6 +329,8 @@ public:
*/
*/
inline
void
SetLayerTarget
(
int
aLayer
,
RENDER_TARGET
aTarget
)
inline
void
SetLayerTarget
(
int
aLayer
,
RENDER_TARGET
aTarget
)
{
{
wxASSERT
(
aLayer
<
(
int
)
m_layers
.
size
()
);
m_layers
[
aLayer
].
target
=
aTarget
;
m_layers
[
aLayer
].
target
=
aTarget
;
}
}
...
@@ -477,6 +490,8 @@ public:
...
@@ -477,6 +490,8 @@ public:
/// Returns true if the layer is cached
/// Returns true if the layer is cached
inline
bool
IsCached
(
int
aLayer
)
const
inline
bool
IsCached
(
int
aLayer
)
const
{
{
wxASSERT
(
aLayer
<
(
int
)
m_layers
.
size
()
);
return
m_layers
.
at
(
aLayer
).
target
==
TARGET_CACHED
;
return
m_layers
.
at
(
aLayer
).
target
==
TARGET_CACHED
;
}
}
...
...
pcbnew/pcb_draw_panel_gal.cpp
View file @
5447bb59
...
@@ -123,10 +123,12 @@ EDA_DRAW_PANEL_GAL( aParentWindow, aWindowId, aPosition, aSize, aGalType )
...
@@ -123,10 +123,12 @@ EDA_DRAW_PANEL_GAL( aParentWindow, aWindowId, aPosition, aSize, aGalType )
// Netnames are drawn only when scale is sufficient (level of details)
// Netnames are drawn only when scale is sufficient (level of details)
// so there is no point in caching them
// so there is no point in caching them
m_view
->
SetLayerTarget
(
layer
,
KIGFX
::
TARGET_NONCACHED
);
m_view
->
SetLayerTarget
(
layer
,
KIGFX
::
TARGET_NONCACHED
);
m_view
->
SetLayerDisplayOnly
(
layer
);
}
}
}
}
m_view
->
SetLayerTarget
(
ITEM_GAL_LAYER
(
ANCHOR_VISIBLE
),
KIGFX
::
TARGET_NONCACHED
);
m_view
->
SetLayerTarget
(
ITEM_GAL_LAYER
(
ANCHOR_VISIBLE
),
KIGFX
::
TARGET_NONCACHED
);
m_view
->
SetLayerDisplayOnly
(
ITEM_GAL_LAYER
(
ANCHOR_VISIBLE
)
);
// Some more required layers settings
// Some more required layers settings
m_view
->
SetRequired
(
ITEM_GAL_LAYER
(
VIAS_HOLES_VISIBLE
),
ITEM_GAL_LAYER
(
VIA_THROUGH_VISIBLE
)
);
m_view
->
SetRequired
(
ITEM_GAL_LAYER
(
VIAS_HOLES_VISIBLE
),
ITEM_GAL_LAYER
(
VIA_THROUGH_VISIBLE
)
);
...
@@ -147,7 +149,13 @@ EDA_DRAW_PANEL_GAL( aParentWindow, aWindowId, aPosition, aSize, aGalType )
...
@@ -147,7 +149,13 @@ EDA_DRAW_PANEL_GAL( aParentWindow, aWindowId, aPosition, aSize, aGalType )
m_view
->
SetRequired
(
ITEM_GAL_LAYER
(
PAD_BK_VISIBLE
),
ITEM_GAL_LAYER
(
MOD_BK_VISIBLE
)
);
m_view
->
SetRequired
(
ITEM_GAL_LAYER
(
PAD_BK_VISIBLE
),
ITEM_GAL_LAYER
(
MOD_BK_VISIBLE
)
);
m_view
->
SetLayerTarget
(
ITEM_GAL_LAYER
(
GP_OVERLAY
),
KIGFX
::
TARGET_OVERLAY
);
m_view
->
SetLayerTarget
(
ITEM_GAL_LAYER
(
GP_OVERLAY
),
KIGFX
::
TARGET_OVERLAY
);
m_view
->
SetLayerDisplayOnly
(
ITEM_GAL_LAYER
(
GP_OVERLAY
)
);
m_view
->
SetLayerTarget
(
ITEM_GAL_LAYER
(
RATSNEST_VISIBLE
),
KIGFX
::
TARGET_OVERLAY
);
m_view
->
SetLayerTarget
(
ITEM_GAL_LAYER
(
RATSNEST_VISIBLE
),
KIGFX
::
TARGET_OVERLAY
);
m_view
->
SetLayerDisplayOnly
(
ITEM_GAL_LAYER
(
RATSNEST_VISIBLE
)
);
m_view
->
SetLayerDisplayOnly
(
ITEM_GAL_LAYER
(
WORKSHEET
)
);
m_view
->
SetLayerDisplayOnly
(
ITEM_GAL_LAYER
(
GRID_VISIBLE
)
);
m_view
->
SetLayerDisplayOnly
(
ITEM_GAL_LAYER
(
DRC_VISIBLE
)
);
// Load display options (such as filled/outline display of items).
// Load display options (such as filled/outline display of items).
// Can be made only if the parent windos is a EDA_DRAW_FRAME (or a derived class)
// Can be made only if the parent windos is a EDA_DRAW_FRAME (or a derived class)
...
...
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