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
b73474bd
Commit
b73474bd
authored
Sep 10, 2013
by
tomasz.wlostowski@cern.ch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VIEW_GROUP: added FreeItems() method
parent
f14db7c7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
10 deletions
+16
-10
view_group.cpp
common/view/view_group.cpp
+8
-9
view_group.h
include/view/view_group.h
+8
-1
No files found.
common/view/view_group.cpp
View file @
b73474bd
...
...
@@ -73,6 +73,14 @@ void VIEW_GROUP::Clear()
updateBbox
();
}
void
VIEW_GROUP
::
FreeItems
()
{
BOOST_FOREACH
(
VIEW_ITEM
*
item
,
m_items
)
{
delete
item
;
}
m_items
.
clear
();
}
unsigned
int
VIEW_GROUP
::
GetSize
()
const
{
...
...
@@ -125,15 +133,6 @@ void VIEW_GROUP::ViewGetLayers( int aLayers[], int& aCount ) const
}
void
VIEW_GROUP
::
ViewUpdate
(
int
aUpdateFlags
,
bool
aForceImmediateRedraw
)
{
BOOST_FOREACH
(
VIEW_ITEM
*
item
,
m_items
)
{
item
->
ViewUpdate
(
aUpdateFlags
,
aForceImmediateRedraw
);
}
}
void
VIEW_GROUP
::
updateBbox
()
{
// Save the used VIEW, as it used nulled during Remove()
...
...
include/view/view_group.h
View file @
b73474bd
...
...
@@ -121,7 +121,7 @@ public:
virtual
void
ViewGetLayers
(
int
aLayers
[],
int
&
aCount
)
const
;
/// @copydoc VIEW_ITEM::ViewUpdate()
virtual
void
ViewUpdate
(
int
aUpdateFlags
,
bool
aForceImmediateRedraw
);
//
virtual void ViewUpdate( int aUpdateFlags, bool aForceImmediateRedraw );
/**
* Function SetLayer()
...
...
@@ -134,6 +134,13 @@ public:
m_layer
=
aLayer
;
}
void
FreeItems
();
KiGfx
::
VIEW
*
GetView
()
const
{
return
m_view
;
}
protected
:
/// These functions cannot be used with VIEW_GROUP as they are intended only to work with
/// singular VIEW_ITEMs (there is only one-to-one relation between item/layer combination and
...
...
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