13
0

add Item::add_front()

This commit is contained in:
Paul Davis 2016-09-25 14:43:57 -05:00
parent 095bdb7d40
commit 5672419fff
2 changed files with 12 additions and 0 deletions

View File

@ -192,6 +192,7 @@ public:
/* nested item ("grouping") API */
void add (Item *);
void add_front (Item *);
void remove (Item *);
void clear (bool with_delete = false);
std::list<Item*> const & items () const {

View File

@ -867,6 +867,17 @@ Item::add (Item* i)
_bounding_box_dirty = true;
}
void
Item::add_front (Item* i)
{
/* XXX should really notify canvas about this */
_items.push_front (i);
i->reparent (this);
invalidate_lut ();
_bounding_box_dirty = true;
}
void
Item::remove (Item* i)
{