remove incorrect merge of cairocanvas patch that stopped most tracks from displaying; add more debugging info

This commit is contained in:
Paul Davis
2013-04-10 14:42:36 -04:00
parent 9a8ee11f65
commit 204da61f98
7 changed files with 12 additions and 14 deletions

View File

@@ -755,6 +755,7 @@ Editor::ensure_time_axis_view_is_visible (const TimeAxisView& tav)
void
Editor::tie_vertical_scrolling ()
{
_track_canvas_vadj->set_value (vertical_adjustment.get_value ());
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {

View File

@@ -28,6 +28,8 @@
#include "ardour/track.h"
#include "ardour/session.h"
#include "pbd/compose.h"
#include "canvas/rectangle.h"
#include "canvas/debug.h"
@@ -63,13 +65,13 @@ StreamView::StreamView (RouteTimeAxisView& tv, ArdourCanvas::Group* background_g
, height(tv.height)
, last_rec_data_frame(0)
{
CANVAS_DEBUG_NAME (_background_group, "SV background group");
CANVAS_DEBUG_NAME (_canvas_group, "SV canvas group");
CANVAS_DEBUG_NAME (_background_group, string_compose ("SV background group %1", _trackview.name()));
CANVAS_DEBUG_NAME (_canvas_group, string_compose ("SV canvas group %1", _trackview.name()));
/* set_position() will position the group */
canvas_rect = new ArdourCanvas::Rectangle (_background_group);
CANVAS_DEBUG_NAME (canvas_rect, "SV canvas rectangle");
CANVAS_DEBUG_NAME (canvas_rect, string_compose ("SV canvas rectangle %1", _trackview.name()));
canvas_rect->set (ArdourCanvas::Rect (0, 0, ArdourCanvas::COORD_MAX, tv.current_height ()));
canvas_rect->raise(1); // raise above tempo lines

View File

@@ -288,12 +288,6 @@ void
TimeAxisView::clip_to_viewport ()
{
if (marked_for_display()) {
if (_y_position + _effective_height < _editor.get_trackview_group_vertical_offset () ||
_y_position > _editor.get_trackview_group_vertical_offset () + _canvas_display->height()) {
_canvas_background->hide ();
_canvas_display->hide ();
return;
}
_canvas_background->show ();
_canvas_display->show ();
}

View File

@@ -109,7 +109,7 @@ TimeAxisViewItem::TimeAxisViewItem(
, _dragging (false)
{
group = new ArdourCanvas::Group (&parent);
CANVAS_DEBUG_NAME (group, "TAVI group");
CANVAS_DEBUG_NAME (group, string_compose ("TAVI group for %1", it_name));
init (it_name, spu, base_color, start, duration, vis, true, true);
}

View File

@@ -26,7 +26,7 @@ public:
std::list<Item*> const & items () const {
return _items;
}
void raise_child_to_top (Item *);
void raise_child (Item *, int);
void lower_child_to_bottom (Item *);

View File

@@ -116,7 +116,7 @@ public:
void raise (int);
void lower_to_bottom ();
void hide ();
void hide ();
void show ();
/** @return true if this item is visible (ie it will be rendered),

View File

@@ -71,7 +71,7 @@ Group::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
if (!(*i)->visible ()) {
#ifdef CANVAS_DEBUG
if (DEBUG_ENABLED(PBD::DEBUG::CanvasRender)) {
cerr << _canvas->render_indent() << "Item " << (*i)->whatami() << ' ' << (*i)->name << " invisible - skipped\n";
cerr << _canvas->render_indent() << "Item " << (*i)->whatami() << " [" << (*i)->name << "] invisible - skipped\n";
}
#endif
continue;
@@ -82,7 +82,7 @@ Group::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
if (!item_bbox) {
#ifdef CANVAS_DEBUG
if (DEBUG_ENABLED(PBD::DEBUG::CanvasRender)) {
cerr << _canvas->render_indent() << "Item " << (*i)->whatami() << ' ' << (*i)->name << " empty - skipped\n";
cerr << _canvas->render_indent() << "Item " << (*i)->whatami() << " [" << (*i)->name << "] empty - skipped\n";
}
#endif
continue;
@@ -279,6 +279,7 @@ Group::dump (ostream& o) const
o << _canvas->indent();
o << "Group " << this;
o << " Items: " << _items.size();
o << " Visible ? " << _visible;
boost::optional<Rect> bb = bounding_box();