edit_cursor = new Cursor (*this, "blue", &Editor::canvas_edit_cursor_event);
playhead_cursor = new Cursor (*this, "red", &Editor::canvas_playhead_cursor_event);
-
+
+ initial_ruler_update_required = true;
track_canvas.signal_size_allocate().connect (mem_fun(*this, &Editor::track_canvas_allocate));
+
}
void
transport_punchout_line->property_y2() = canvas_height;
}
- update_fixed_rulers ();
-
- if (is_visible()) {
+ if (is_visible() && initial_ruler_update_required) {
+ /*
+ this is really dumb, but signal_size_allocate() gets emitted intermittently
+ depending on whether the canvas contents are visible or not.
+ we only want to do this once
+ */
+ update_fixed_rulers();
tempo_map_changed (Change (0));
+ initial_ruler_update_required = false;
}
Resized (); /* EMIT_SIGNAL */
const SelectionData& data,
guint info, guint time)
{
+ cerr << "dropping, target = " << data.get_target() << endl;
+
if (data.get_target() == "regions") {
drop_regions (context, x, y, data, info, time);
} else {
const SelectionData& data,
guint info, guint time)
{
- const DnDTreeView::SerializedObjectPointers* sr = reinterpret_cast<const DnDTreeView::SerializedObjectPointers*> (data.get_data());
+ const SerializedObjectPointers<boost::shared_ptr<Region> >* sr =
+ reinterpret_cast<const SerializedObjectPointers<boost::shared_ptr<Region> > *> (data.get_data());
for (uint32_t i = 0; i < sr->cnt; ++i) {
- boost::shared_ptr<Region> r (reinterpret_cast<Region*> (sr->ptr[i]));
+ boost::shared_ptr<Region> r = sr->data[i];
boost::shared_ptr<AudioRegion> ar;
if ((ar = boost::dynamic_pointer_cast<AudioRegion>(r)) != 0) {