follow libcanvas API changes related to Item::clear

This commit is contained in:
Paul Davis 2017-08-24 22:37:16 -04:00
parent 6499e06dac
commit 7e66535c84
6 changed files with 18 additions and 16 deletions

View file

@ -170,8 +170,8 @@ ColorThemeManager::ColorThemeManager ()
ColorThemeManager::~ColorThemeManager ()
{
if (palette_group) {
palette_group->clear (true);
if (palette_group) {
palette_group->clear_children (true);
delete palette_group;
}
}
@ -318,7 +318,7 @@ ColorThemeManager::build_palette_canvas (ArdourCanvas::Canvas& canvas, ArdourCan
/* clear existing rects and delete them */
group.clear (true);
group.clear_children (true);
for (uint32_t y = 0; y < height - box_size && color_num < color_limit; y += box_size) {
for (uint32_t x = 0; x < width - box_size && color_num < color_limit; x += box_size) {

View file

@ -369,7 +369,7 @@ MidiGhostRegion::add_note (NoteBase* n)
void
MidiGhostRegion::clear_events()
{
_note_group->clear (true);
_note_group->clear_children (true);
events.clear ();
_optimization_iterator = events.end();
}

View file

@ -977,7 +977,7 @@ MidiRegionView::clear_events ()
}
_note_group->clear (true);
_note_group->clear_children (true);
_events.clear();
_patch_changes.clear();
_sys_exes.clear();

View file

@ -316,7 +316,7 @@ MidiStreamView::draw_note_lines()
double prev_y = .5;
uint32_t color;
_note_lines->clear();
_note_lines->clear_lines();
if (child_height() < 140 || note_height() < 3) {
/* track is too small for note lines, or there are too many */
@ -336,7 +336,7 @@ MidiStreamView::draw_note_lines()
*/
if (i <= highest_note()) {
_note_lines->add (y, 1.0, UIConfiguration::instance().color ("piano roll black outline"));
_note_lines->add_line (y, 1.0, UIConfiguration::instance().color ("piano roll black outline"));
}
/* now add a thicker line/bar which covers the entire vertical
@ -360,7 +360,7 @@ MidiStreamView::draw_note_lines()
double mid = y + (h/2.0);
if (mid >= 0 && h > 1.0) {
_note_lines->add (mid, h, color);
_note_lines->add_line (mid, h, color);
}
prev_y = y;

View file

@ -45,7 +45,7 @@ TempoLines::~TempoLines ()
void
TempoLines::tempo_map_changed (framepos_t new_origin)
{
lines.clear ();
lines.clear_lines ();
_bfc->set_origin_b (new_origin);
}
@ -83,7 +83,7 @@ TempoLines::draw_ticks (std::vector<ARDOUR::TempoMap::BBTPoint>& grid,
const framepos_t f = _bfc->to (Evoral::Beats (grid.begin()->qn + (l / (double) divisions))) + _bfc->origin_b();
if (f > leftmost_frame) {
lines.add (PublicEditor::instance().sample_to_pixel_unrounded (f), 1.0, c);
lines.add_line (PublicEditor::instance().sample_to_pixel_unrounded (f), 1.0, c);
}
}
}
@ -138,7 +138,7 @@ TempoLines::draw (std::vector<ARDOUR::TempoMap::BBTPoint>& grid,
if (beat_density > 2.0f) {
/* if the lines are too close together, they become useless */
lines.clear ();
lines.clear_lines ();
return;
}
@ -147,7 +147,7 @@ TempoLines::draw (std::vector<ARDOUR::TempoMap::BBTPoint>& grid,
divisions /= 2;
}
lines.clear ();
lines.clear_lines ();
if (beat_density <= 0.12 && grid.begin() != grid.end() && grid.begin()->frame > 0 && !all_bars) {
/* draw subdivisions of the beat before the first visible beat line XX this shouldn't happen now */
std::vector<ARDOUR::TempoMap::BBTPoint> vec;
@ -173,7 +173,7 @@ TempoLines::draw (std::vector<ARDOUR::TempoMap::BBTPoint>& grid,
ArdourCanvas::Coord xpos = PublicEditor::instance().sample_to_pixel_unrounded ((*i).frame);
lines.add (xpos, 1.0, color);
lines.add_line (xpos, 1.0, color);
if (beat_density <= 0.12 && !all_bars) {
/* draw subdivisions of this beat */

View file

@ -60,9 +60,11 @@ LevelMeter::LevelMeter (Push2& p, Item* parent, int len, Meter::Orientation o)
Config->ParameterChanged.connect (_parameter_connection, invalidator(*this), boost::bind (&LevelMeter::parameter_changed, this, _1), &p2);
if (_meter_orientation == Meter::Vertical) {
meter_packer = new HBox (this);
meter_packer = new HBox (_canvas);
add (meter_packer);
} else {
meter_packer = new VBox (this);
meter_packer = new VBox (_canvas);
add (meter_packer);
}
meter_packer->set_collapse_on_hide (true);
@ -492,7 +494,7 @@ LevelMeter::set_type(MeterType t)
void LevelMeter::clear_meters (bool reset_highlight)
{
for (vector<MeterInfo>::iterator i = meters.begin(); i < meters.end(); i++) {
(*i).meter->clear();
(*i).meter->clear_display();
(*i).max_peak = minus_infinity();
if (reset_highlight)
(*i).meter->set_highlight(false);