summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-02-06 15:05:51 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-02-06 15:05:51 +0000
commit9eb8d34ecfc0bb5aa98700f8bd5c813f19a9f547 (patch)
treeebe3dde0599266d83f2d5780762c05650176ba6a
parent36b4930c4553224c2191bdff452d34155efd2d5b (diff)
proper fix for stereo region wave drawing bug; make trackheight operations apply to all selected tracks
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3019 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/audio_region_view.cc11
-rw-r--r--gtk2_ardour/audio_region_view.h2
-rw-r--r--gtk2_ardour/editor_selection.cc3
-rw-r--r--gtk2_ardour/engine_dialog.cc4
-rw-r--r--gtk2_ardour/time_axis_view.cc23
-rw-r--r--gtk2_ardour/time_axis_view.h1
6 files changed, 30 insertions, 14 deletions
diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc
index 8f5413560a..9601741662 100644
--- a/gtk2_ardour/audio_region_view.cc
+++ b/gtk2_ardour/audio_region_view.cc
@@ -122,7 +122,7 @@ AudioRegionView::init (Gdk::Color& basic_color, bool wfd)
// FIXME: Some redundancy here with RegionView::init. Need to figure out
// where order is important and where it isn't...
- RegionView::init (basic_color, true);
+ RegionView::init (basic_color, wfd);
XMLNode *node;
@@ -786,6 +786,15 @@ AudioRegionView::create_waves ()
wave_caches.push_back (WaveView::create_cache ());
if (wait_for_data) {
+ if (audio_region()->source(n)->peaks_ready (bind (mem_fun(*this, &AudioRegionView::peaks_ready_handler), n), data_ready_connection)) {
+ create_one_wave (n, true);
+ } else {
+ // we'll get a PeaksReady signal from the source in the future
+ // and will call create_one_wave(n) then.
+ }
+
+ } else {
+
create_one_wave (n, true);
}
diff --git a/gtk2_ardour/audio_region_view.h b/gtk2_ardour/audio_region_view.h
index f84b0e25cc..adeb2bb78b 100644
--- a/gtk2_ardour/audio_region_view.h
+++ b/gtk2_ardour/audio_region_view.h
@@ -58,7 +58,7 @@ class AudioRegionView : public RegionView
~AudioRegionView ();
- virtual void init (Gdk::Color& base_color, bool wait_for_data = false);
+ virtual void init (Gdk::Color& base_color, bool wait_for_data);
boost::shared_ptr<ARDOUR::AudioRegion> audio_region() const;
diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc
index 224d282a55..79998154e2 100644
--- a/gtk2_ardour/editor_selection.cc
+++ b/gtk2_ardour/editor_selection.cc
@@ -182,9 +182,6 @@ Editor::set_selected_track_as_side_effect (bool force)
void
Editor::set_selected_track (TimeAxisView& view, Selection::Operation op, bool no_remove)
{
-
- cerr << "set selected track, op = " << op << " selected ? " << selection->selected (&view) << " no remove? " << no_remove << endl;
-
switch (op) {
case Selection::Toggle:
if (selection->selected (&view)) {
diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc
index 637febcd94..0c002374ac 100644
--- a/gtk2_ardour/engine_dialog.cc
+++ b/gtk2_ardour/engine_dialog.cc
@@ -815,7 +815,7 @@ EngineControl::driver_changed ()
vector<string>& strings = devices[driver];
- if (strings.empty() && driver != "FFADO") {
+ if (strings.empty() && driver != "FFADO" && driver != "Dummy") {
error << string_compose (_("No devices found for driver \"%1\""), driver) << endmsg;
return;
}
@@ -835,7 +835,7 @@ EngineControl::driver_changed ()
interface_combo.set_active_text (strings.front());
input_device_combo.set_active_text (strings.front());
output_device_combo.set_active_text (strings.front());
- }
+ }
if (driver == "ALSA") {
soft_mode_button.set_sensitive (true);
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc
index 904e627273..ecfeccff59 100644
--- a/gtk2_ardour/time_axis_view.cc
+++ b/gtk2_ardour/time_axis_view.cc
@@ -271,7 +271,6 @@ TimeAxisView::controls_ebox_scroll (GdkEventScroll* ev)
bool
TimeAxisView::controls_ebox_button_release (GdkEventButton* ev)
{
- cerr << "CEB button release\n";
switch (ev->button) {
case 1:
selection_click (ev);
@@ -354,6 +353,16 @@ TimeAxisView::step_height (bool bigger)
}
void
+TimeAxisView::set_heights (TrackHeight h)
+{
+ TrackSelection& ts (editor.get_selection().tracks);
+
+ for (TrackSelection::iterator i = ts.begin(); i != ts.end(); ++i) {
+ (*i)->set_height (h);
+ }
+}
+
+void
TimeAxisView::set_height (TrackHeight h)
{
height_style = h;
@@ -586,12 +595,12 @@ TimeAxisView::build_size_menu ()
size_menu->set_name ("ArdourContextMenu");
MenuList& items = size_menu->items();
- items.push_back (MenuElem (_("Largest"), bind (mem_fun (*this, &TimeAxisView::set_height), Largest)));
- items.push_back (MenuElem (_("Large"), bind (mem_fun (*this, &TimeAxisView::set_height), Large)));
- items.push_back (MenuElem (_("Larger"), bind (mem_fun (*this, &TimeAxisView::set_height), Larger)));
- items.push_back (MenuElem (_("Normal"), bind (mem_fun (*this, &TimeAxisView::set_height), Normal)));
- items.push_back (MenuElem (_("Smaller"), bind (mem_fun (*this, &TimeAxisView::set_height),Smaller)));
- items.push_back (MenuElem (_("Small"), bind (mem_fun (*this, &TimeAxisView::set_height), Small)));
+ items.push_back (MenuElem (_("Largest"), bind (mem_fun (*this, &TimeAxisView::set_heights), Largest)));
+ items.push_back (MenuElem (_("Large"), bind (mem_fun (*this, &TimeAxisView::set_heights), Large)));
+ items.push_back (MenuElem (_("Larger"), bind (mem_fun (*this, &TimeAxisView::set_heights), Larger)));
+ items.push_back (MenuElem (_("Normal"), bind (mem_fun (*this, &TimeAxisView::set_heights), Normal)));
+ items.push_back (MenuElem (_("Smaller"), bind (mem_fun (*this, &TimeAxisView::set_heights),Smaller)));
+ items.push_back (MenuElem (_("Small"), bind (mem_fun (*this, &TimeAxisView::set_heights), Small)));
}
void
diff --git a/gtk2_ardour/time_axis_view.h b/gtk2_ardour/time_axis_view.h
index 27d6ba632a..848521f430 100644
--- a/gtk2_ardour/time_axis_view.h
+++ b/gtk2_ardour/time_axis_view.h
@@ -322,6 +322,7 @@ class TimeAxisView : public virtual AxisView
static void compute_controls_size_info ();
static bool need_size_info;
+ void set_heights (TrackHeight);
void set_height_pixels (uint32_t h);
void color_handler ();