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
b7447ff0
Commit
b7447ff0
authored
Jul 08, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove updating of non-cached layers.
parent
36f1147d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
view.cpp
common/view/view.cpp
+15
-3
No files found.
common/view/view.cpp
View file @
b7447ff0
...
@@ -314,9 +314,9 @@ struct VIEW::updateItemsColor
...
@@ -314,9 +314,9 @@ struct VIEW::updateItemsColor
// Obtain the color that should be used for coloring the item
// Obtain the color that should be used for coloring the item
const
COLOR4D
color
=
painter
->
GetColor
(
aItem
,
layer
);
const
COLOR4D
color
=
painter
->
GetColor
(
aItem
,
layer
);
int
group
=
aItem
->
getGroup
(
layer
);
int
group
=
aItem
->
getGroup
(
layer
);
wxASSERT
(
group
>=
0
);
gal
->
ChangeGroupColor
(
group
,
color
);
if
(
group
>
0
)
gal
->
ChangeGroupColor
(
group
,
color
);
}
}
int
layer
;
int
layer
;
...
@@ -327,6 +327,10 @@ struct VIEW::updateItemsColor
...
@@ -327,6 +327,10 @@ struct VIEW::updateItemsColor
void
VIEW
::
UpdateLayerColor
(
int
aLayer
)
void
VIEW
::
UpdateLayerColor
(
int
aLayer
)
{
{
// There is no point in updating non-cached layers
if
(
!
m_layers
[
aLayer
].
cached
)
return
;
BOX2I
r
;
BOX2I
r
;
r
.
SetMaximum
();
r
.
SetMaximum
();
...
@@ -345,8 +349,12 @@ void VIEW::UpdateAllLayersColor()
...
@@ -345,8 +349,12 @@ void VIEW::UpdateAllLayersColor()
for
(
LayerMapIter
i
=
m_layers
.
begin
();
i
!=
m_layers
.
end
();
++
i
)
for
(
LayerMapIter
i
=
m_layers
.
begin
();
i
!=
m_layers
.
end
();
++
i
)
{
{
VIEW_LAYER
*
l
=
&
(
(
*
i
).
second
);
VIEW_LAYER
*
l
=
&
(
(
*
i
).
second
);
updateItemsColor
visitor
(
l
->
id
,
m_painter
,
m_gal
);
// There is no point in updating non-cached layers
if
(
!
m_layers
[
l
->
id
].
cached
)
continue
;
updateItemsColor
visitor
(
l
->
id
,
m_painter
,
m_gal
);
l
->
items
->
Query
(
r
,
visitor
);
l
->
items
->
Query
(
r
,
visitor
);
}
}
}
}
...
@@ -374,6 +382,10 @@ struct VIEW::changeItemsDepth
...
@@ -374,6 +382,10 @@ struct VIEW::changeItemsDepth
void
VIEW
::
ChangeLayerDepth
(
int
aLayer
,
int
aDepth
)
void
VIEW
::
ChangeLayerDepth
(
int
aLayer
,
int
aDepth
)
{
{
// There is no point in updating non-cached layers
if
(
!
m_layers
[
aLayer
].
cached
)
return
;
BOX2I
r
;
BOX2I
r
;
r
.
SetMaximum
();
r
.
SetMaximum
();
...
...
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