mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-01 03:17:39 +01:00
canvas: add PolyItem::clear()
This commit is contained in:
parent
ff021b83d3
commit
cd99fed7cd
2 changed files with 12 additions and 0 deletions
|
|
@ -37,6 +37,7 @@ public:
|
|||
|
||||
virtual void set (Points const&);
|
||||
virtual void add_point (Duple const &);
|
||||
virtual void clear ();
|
||||
void pop_back();
|
||||
Points const& get () const;
|
||||
|
||||
|
|
|
|||
|
|
@ -158,6 +158,17 @@ PolyItem::pop_back ()
|
|||
end_change ();
|
||||
}
|
||||
|
||||
void
|
||||
PolyItem::clear ()
|
||||
{
|
||||
if (!_points.empty()) {
|
||||
begin_change ();
|
||||
_points.clear ();
|
||||
set_bbox_dirty ();
|
||||
end_change ();
|
||||
}
|
||||
}
|
||||
|
||||
Points const&
|
||||
PolyItem::get () const
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue