13
0

don't change waveform zoom level when waveform is hidden, to save peak reloads, remove unused Editor signal

git-svn-id: svn://localhost/ardour2/trunk@1487 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2007-02-22 18:26:44 +00:00
parent feeb538498
commit 989d6b3d2a
7 changed files with 14 additions and 9 deletions

View File

@ -607,13 +607,16 @@ AudioRegionView::set_samples_per_unit (gdouble spu)
{
RegionView::set_samples_per_unit (spu);
for (uint32_t n=0; n < waves.size(); ++n) {
waves[n]->property_samples_per_unit() = spu;
if (_flags & WaveformVisible) {
for (uint32_t n=0; n < waves.size(); ++n) {
waves[n]->property_samples_per_unit() = spu;
}
}
if (gain_line) {
gain_line->reset ();
}
reset_fade_shapes ();
}
@ -676,6 +679,10 @@ AudioRegionView::set_waveform_visible (bool yn)
if (((_flags & WaveformVisible) != yn)) {
if (yn) {
for (uint32_t n=0; n < waves.size(); ++n) {
/* make sure the zoom level is correct, since we don't update
this when waveforms are hidden.
*/
waves[n]->property_samples_per_unit() = samples_per_unit;
waves[n]->show();
}
_flags |= WaveformVisible;

View File

@ -25,6 +25,7 @@
#include <pbd/stl_delete.h>
#include <pbd/memento_command.h>
#include <pbd/stacktrace.h>
#include <ardour/automation_event.h>
#include <ardour/curve.h>

View File

@ -369,7 +369,8 @@ gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview, gulong start_
end_sample = end_sample + waveview->region_start;
#if DEBUG_CACHE
// printf("waveview->region_start == %lu\n",waveview->region_start);
printf ("=> 0x%x cache @ 0x%x range: %lu - %lu request: %lu - %lu (%lu frames)\n",
// c_stacktrace ();
printf ("\n\n=> 0x%x cache @ 0x%x range: %lu - %lu request: %lu - %lu (%lu frames)\n",
waveview, cache,
cache->start, cache->end,
start_sample, end_sample, end_sample - start_sample);
@ -413,7 +414,7 @@ gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview, gulong start_
}
#if DEBUG_CACHE
fprintf (stderr, "\n\nAVAILABLE FRAMES = %lu of %lu, start = %lu, sstart = %lu, cstart = %lu\n",
fprintf (stderr, "AVAILABLE FRAMES = %lu of %lu, start = %lu, sstart = %lu, cstart = %lu\n",
rf3, waveview->sourcefile_length_function (waveview->data_src, waveview->samples_per_unit),
waveview->region_start, start_sample, new_cache_start);
#endif

View File

@ -3181,7 +3181,6 @@ Editor::set_show_measures (bool yn)
if ((_show_measures = yn) == true) {
draw_measures ();
}
DisplayControlChanged (ShowMeasures);
instant_save ();
}
}
@ -3204,7 +3203,6 @@ Editor::set_follow_playhead (bool yn)
/* catch up */
update_current_screen ();
}
DisplayControlChanged (FollowPlayhead);
instant_save ();
}
}

View File

@ -45,7 +45,6 @@ Editor::set_show_waveforms (bool yn)
atv->set_show_waveforms (yn);
}
}
DisplayControlChanged (Editing::ShowWaveforms);
}
}
@ -61,6 +60,5 @@ Editor::set_show_waveforms_recording (bool yn)
atv->set_show_waveforms_recording (yn);
}
}
DisplayControlChanged (Editing::ShowWaveformsRecording);
}
}

View File

@ -713,6 +713,7 @@ Editor::canvas_horizontally_scrolled ()
nframes_t rightmost_frame = leftmost_frame + current_page_frames ();
if (rightmost_frame > last_canvas_frame) {
cerr << "right most = " << rightmost_frame << " last = " << last_canvas_frame << endl;
last_canvas_frame = rightmost_frame;
reset_scrolling_region ();
}

View File

@ -135,7 +135,6 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulThingWithGoingAway
virtual void maximise_editing_space() = 0;
virtual void restore_editing_space() = 0;
sigc::signal<void,Editing::DisplayControl> DisplayControlChanged;
sigc::signal<void> ZoomFocusChanged;
sigc::signal<void> ZoomChanged;
sigc::signal<void> Resized;