mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-06 13:45:43 +01:00
very important fix to avoid double delete of waveview caches, since regionviews own the cache, not the waveview
git-svn-id: svn://localhost/trunk/ardour2@203 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
24e9a93968
commit
d391778650
5 changed files with 4 additions and 73 deletions
|
|
@ -329,8 +329,6 @@ gnome_canvas_waveview_destroy (GtkObject *object)
|
|||
|
||||
waveview = GNOME_CANVAS_WAVEVIEW (object);
|
||||
|
||||
gnome_canvas_waveview_cache_destroy (waveview->cache);
|
||||
|
||||
if (GTK_OBJECT_CLASS (parent_class)->destroy)
|
||||
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (C) 2000 Paul Davis
|
||||
Copyright (C) 2000-2006 Paul Davis
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -1153,8 +1153,6 @@ Editor::connect_to_session (Session *t)
|
|||
first_action_message->hide();
|
||||
}
|
||||
|
||||
flush_track_canvas();
|
||||
|
||||
update_title ();
|
||||
|
||||
session->going_away.connect (mem_fun(*this, &Editor::session_going_away));
|
||||
|
|
@ -2978,19 +2976,6 @@ Editor::commit_reversible_command ()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::flush_track_canvas ()
|
||||
{
|
||||
/* I don't think this is necessary, and only causes more problems.
|
||||
I'm commenting it out
|
||||
and if the imageframe folks don't have any issues, we can take
|
||||
out this method entirely
|
||||
*/
|
||||
|
||||
//gnome_canvas_update_now (GNOME_CANVAS(track_canvas));
|
||||
//gtk_main_iteration ();
|
||||
}
|
||||
|
||||
void
|
||||
Editor::set_selected_track_from_click (bool add, bool with_undo, bool no_remove)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -633,8 +633,6 @@ Editor::imageframe_start_handle_op(ArdourCanvas::Item* item, GdkEvent* event)
|
|||
drag_info.motion_callback = &Editor::imageframe_start_handle_trim_motion ;
|
||||
drag_info.finished_callback = &Editor::imageframe_start_handle_end_trim ;
|
||||
|
||||
flush_track_canvas() ;
|
||||
|
||||
start_grab(event) ;
|
||||
|
||||
show_verbose_time_cursor(ifv->get_position(), 10) ;
|
||||
|
|
@ -665,8 +663,6 @@ Editor::imageframe_end_handle_op(ArdourCanvas::Item* item, GdkEvent* event)
|
|||
drag_info.motion_callback = &Editor::imageframe_end_handle_trim_motion ;
|
||||
drag_info.finished_callback = &Editor::imageframe_end_handle_end_trim ;
|
||||
|
||||
flush_track_canvas() ;
|
||||
|
||||
start_grab(event, trimmer_cursor) ;
|
||||
|
||||
show_verbose_time_cursor(ifv->get_position() + ifv->get_duration(), 10) ;
|
||||
|
|
@ -760,8 +756,6 @@ Editor::imageframe_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* eve
|
|||
ifv->set_position((jack_nframes_t) (temp - drag_info.cumulative_x_drag), this) ;
|
||||
ifv->set_duration((jack_nframes_t) drag_info.cumulative_x_drag, this) ;
|
||||
}
|
||||
|
||||
flush_track_canvas() ;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -840,8 +834,6 @@ Editor::imageframe_end_handle_end_trim (ArdourCanvas::Item* item, GdkEvent* even
|
|||
ifv->set_duration(new_duration, this) ;
|
||||
}
|
||||
}
|
||||
|
||||
flush_track_canvas ();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -865,8 +857,6 @@ Editor::markerview_item_start_handle_op(ArdourCanvas::Item* item, GdkEvent* even
|
|||
drag_info.motion_callback = &Editor::markerview_start_handle_trim_motion ;
|
||||
drag_info.finished_callback = &Editor::markerview_start_handle_end_trim ;
|
||||
|
||||
flush_track_canvas() ;
|
||||
|
||||
start_grab(event, trimmer_cursor) ;
|
||||
}
|
||||
|
||||
|
|
@ -889,8 +879,6 @@ Editor::markerview_item_end_handle_op(ArdourCanvas::Item* item, GdkEvent* event)
|
|||
drag_info.motion_callback = &Editor::markerview_end_handle_trim_motion ;
|
||||
drag_info.finished_callback = &Editor::markerview_end_handle_end_trim ;
|
||||
|
||||
flush_track_canvas () ;
|
||||
|
||||
start_grab(event, trimmer_cursor) ;
|
||||
}
|
||||
|
||||
|
|
@ -985,8 +973,6 @@ Editor::markerview_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* eve
|
|||
mv->set_position((jack_nframes_t) (temp - drag_info.cumulative_x_drag), this) ;
|
||||
mv->set_duration((jack_nframes_t) drag_info.cumulative_x_drag, this) ;
|
||||
}
|
||||
|
||||
flush_track_canvas() ;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1079,8 +1065,6 @@ Editor::markerview_end_handle_end_trim (ArdourCanvas::Item* item, GdkEvent* even
|
|||
jack_nframes_t new_duration = (jack_nframes_t)drag_info.cumulative_x_drag ;
|
||||
mv->set_duration(new_duration, this) ;
|
||||
}
|
||||
|
||||
flush_track_canvas() ;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3740,8 +3740,6 @@ Editor::start_trim (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
show_verbose_time_cursor(drag_info.current_pointer_frame, 10);
|
||||
break;
|
||||
}
|
||||
|
||||
flush_track_canvas ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -3991,8 +3989,6 @@ Editor::trim_finished_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
/* no mouse movement */
|
||||
point_trim (event);
|
||||
}
|
||||
|
||||
flush_track_canvas ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -1001,13 +1001,14 @@ AudioRegionView::create_one_wave (uint32_t which, bool direct)
|
|||
uint32_t nchans = atv.get_diskstream()->n_channels();
|
||||
uint32_t n;
|
||||
uint32_t nwaves = std::min (nchans, region.n_channels());
|
||||
|
||||
gdouble ht;
|
||||
|
||||
if (trackview.height < NAME_HIGHLIGHT_SIZE) {
|
||||
ht = ((trackview.height) / (double) nchans);
|
||||
} else {
|
||||
ht = ((trackview.height - NAME_HIGHLIGHT_SIZE) / (double) nchans);
|
||||
}
|
||||
|
||||
gdouble yoff = which * ht;
|
||||
|
||||
WaveView *wave = new WaveView(*group);
|
||||
|
|
@ -1026,24 +1027,7 @@ AudioRegionView::create_one_wave (uint32_t which, bool direct)
|
|||
wave->property_amplitude_above_axis() = _amplitude_above_axis;
|
||||
wave->property_wave_color() = region.muted() ? color_map[cMutedWaveForm] : color_map[cWaveForm];
|
||||
wave->property_region_start() = region.start();
|
||||
// WaveView *wave = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
|
||||
// gnome_canvas_waveview_get_type (),
|
||||
// "data_src", (gpointer) ®ion,
|
||||
// "cache", wave_caches[which],
|
||||
// "cache_updater", (gboolean) true,
|
||||
// "channel", (guint32) which,
|
||||
// "length_function", (gpointer) region_length_from_c,
|
||||
// "sourcefile_length_function",(gpointer) sourcefile_length_from_c,
|
||||
// "peak_function", (gpointer) region_read_peaks_from_c,
|
||||
// "x", 0.0,
|
||||
// "y", yoff,
|
||||
// "height", (double) ht,
|
||||
// "samples_per_unit", samples_per_unit,
|
||||
// "amplitude_above_axis", _amplitude_above_axis,
|
||||
// "wave_color", (guint32) (region.muted() ? color_map[cMutedWaveForm] : color_map[cWaveForm]),
|
||||
// "region_start",(guint32) region.start(),
|
||||
// NULL);
|
||||
|
||||
|
||||
if (!(_flags & WaveformVisible)) {
|
||||
wave->hide();
|
||||
}
|
||||
|
|
@ -1262,23 +1246,7 @@ AudioRegionView::add_ghost (AutomationTimeAxisView& atv)
|
|||
wave->property_amplitude_above_axis() = _amplitude_above_axis;
|
||||
wave->property_wave_color() = color_map[cGhostTrackWave];
|
||||
wave->property_region_start() = region.start();
|
||||
// WaveView *wave = gnome_canvas_item_new (GNOME_CANVAS_GROUP(ghost->group),
|
||||
// gnome_canvas_waveview_get_type (),
|
||||
// "data_src", (gpointer) ®ion,
|
||||
// "cache", wave_caches[n],
|
||||
// "cache_updater", (gboolean) false,
|
||||
// "channel", (guint32) n,
|
||||
// "length_function", (gpointer) region_length_from_c,
|
||||
// "sourcefile_length_function",(gpointer) sourcefile_length_from_c,
|
||||
// "peak_function", (gpointer) region_read_peaks_from_c,
|
||||
// "x", 0.0,
|
||||
// "samples_per_unit", samples_per_unit,
|
||||
// "amplitude_above_axis", _amplitude_above_axis,
|
||||
// "wave_color", color_map[cGhostTrackWave],
|
||||
// "region_start", (guint32) region.start(),
|
||||
// NULL);
|
||||
|
||||
|
||||
ghost->waves.push_back(wave);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue