From bcd511aa3fec59e1527c8b7ab80dabda4db1a6f9 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 25 Oct 2006 20:11:42 +0000 Subject: fixes for endemic (compiler?) issues with virtual inheritance of sigc::trackable. NOTE: automation list undo/redo no longer operational, fix to follow git-svn-id: svn://localhost/ardour2/trunk@1007 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/audio_regionview.cc | 5 ++++- gtk2_ardour/audio_streamview.cc | 1 + gtk2_ardour/automation_line.cc | 2 ++ gtk2_ardour/automation_line.h | 4 +++- gtk2_ardour/crossfade_view.cc | 2 +- gtk2_ardour/editor_ops.cc | 2 +- gtk2_ardour/public_editor.h | 3 ++- gtk2_ardour/region_gain_line.cc | 2 ++ gtk2_ardour/region_gain_line.h | 2 ++ gtk2_ardour/route_ui.cc | 2 +- 10 files changed, 19 insertions(+), 6 deletions(-) (limited to 'gtk2_ardour') diff --git a/gtk2_ardour/audio_regionview.cc b/gtk2_ardour/audio_regionview.cc index fdbb961ab6..b50ea72be2 100644 --- a/gtk2_ardour/audio_regionview.cc +++ b/gtk2_ardour/audio_regionview.cc @@ -1143,9 +1143,10 @@ AudioRegionView::add_gain_point_event (ArdourCanvas::Item *item, GdkEvent *ev) gain_line->view_to_model_y (y); +#ifdef FIX_ME_TO_NOT_USE_STATE_MANAGER trackview.session().begin_reversible_command (_("add gain control point")); trackview.session().add_undo (region.envelope().get_memento()); - +#endif if (!region.envelope_active()) { trackview.session().add_undo( bind( mem_fun(region, &AudioRegion::set_envelope_active), false) ); @@ -1155,8 +1156,10 @@ AudioRegionView::add_gain_point_event (ArdourCanvas::Item *item, GdkEvent *ev) region.envelope().add (fx, y); +#ifdef FIX_ME_TO_NOT_USE_STATE_MANAGER trackview.session().add_redo_no_execute (region.envelope().get_memento()); trackview.session().commit_reversible_command (); +#endif } void diff --git a/gtk2_ardour/audio_streamview.cc b/gtk2_ardour/audio_streamview.cc index 24924fec4f..75eb28e7d5 100644 --- a/gtk2_ardour/audio_streamview.cc +++ b/gtk2_ardour/audio_streamview.cc @@ -202,6 +202,7 @@ AudioStreamView::remove_region_view (boost::weak_ptr weak_r) } } + StreamView::remove_region_view(r); } diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc index ee74fabfa4..371552fbfc 100644 --- a/gtk2_ardour/automation_line.cc +++ b/gtk2_ardour/automation_line.cc @@ -1169,12 +1169,14 @@ AutomationLine::hide_selection () } +#ifdef STATE_MANAGER // This is copied into AudioRegionGainLine UndoAction AutomationLine::get_memento () { return alist.get_memento(); } +#endif void AutomationLine::list_changed (Change ignored) diff --git a/gtk2_ardour/automation_line.h b/gtk2_ardour/automation_line.h index eb2d204513..0e44c95a33 100644 --- a/gtk2_ardour/automation_line.h +++ b/gtk2_ardour/automation_line.h @@ -96,7 +96,7 @@ class ControlPoint ShapeType _shape; }; -class AutomationLine : public PBD::StatefulDestructible +class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoingAway { public: AutomationLine (const string & name, TimeAxisView&, ArdourCanvas::Group&, ARDOUR::AutomationList&); @@ -206,7 +206,9 @@ class AutomationLine : public PBD::StatefulDestructible void reset_callback (const ARDOUR::AutomationList&); void list_changed (ARDOUR::Change); +#ifdef STATE_MANAGER UndoAction get_memento(); +#endif virtual bool event_handler (GdkEvent*); diff --git a/gtk2_ardour/crossfade_view.cc b/gtk2_ardour/crossfade_view.cc index 42a1a47227..e8a97c4cf4 100644 --- a/gtk2_ardour/crossfade_view.cc +++ b/gtk2_ardour/crossfade_view.cc @@ -89,7 +89,7 @@ CrossfadeView::CrossfadeView (ArdourCanvas::Group *parent, CrossfadeView::~CrossfadeView () { - GoingAway (this) ; /* EMIT_SIGNAL */ + GoingAway (this) ; /* EMIT_SIGNAL */ } void diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index c7a10df5a0..280804c94f 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -3340,7 +3340,7 @@ Editor::normalize_region () continue; XMLNode &before = arv->region()->get_state(); arv->audio_region()->normalize_to (0.0f); - // session->add_command (new MementoCommand(*(arv->region().get()), &before, &arv->region()->get_state())); + session->add_command (new MementoCommand(*(arv->region().get()), &before, &arv->region()->get_state())); } commit_reversible_command (); diff --git a/gtk2_ardour/public_editor.h b/gtk2_ardour/public_editor.h index 189e2100bb..0c68eb6221 100644 --- a/gtk2_ardour/public_editor.h +++ b/gtk2_ardour/public_editor.h @@ -53,7 +53,7 @@ class ImageFrameView; class ImageFrameTimeAxis; class MarkerView; -class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible { +class PublicEditor : public Gtk::Window, public PBD::StatefulThingWithGoingAway { public: PublicEditor(); virtual ~PublicEditor(); @@ -135,6 +135,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible { sigc::signal ZoomChanged; sigc::signal Resized; sigc::signal Realized; + sigc::signal GoingAway; Glib::RefPtr editor_actions; diff --git a/gtk2_ardour/region_gain_line.cc b/gtk2_ardour/region_gain_line.cc index 467f24bd94..58a8a9acad 100644 --- a/gtk2_ardour/region_gain_line.cc +++ b/gtk2_ardour/region_gain_line.cc @@ -89,9 +89,11 @@ AudioRegionGainLine::end_drag (ControlPoint* cp) } +#ifdef STATE_MANAGER // This is a copy from AutomationList UndoAction AudioRegionGainLine::get_memento () { return alist.get_memento(); } +#endif diff --git a/gtk2_ardour/region_gain_line.h b/gtk2_ardour/region_gain_line.h index 3781fe60bb..916bf78a78 100644 --- a/gtk2_ardour/region_gain_line.h +++ b/gtk2_ardour/region_gain_line.h @@ -31,7 +31,9 @@ class AudioRegionGainLine : public AutomationLine ARDOUR::Session& session; AudioRegionView& rv; +#ifdef STATE_MANAGER UndoAction get_memento(); +#endif }; diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index 482f5df22f..bb24dcc426 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -66,7 +66,7 @@ RouteUI::RouteUI (boost::shared_ptr rt, ARDOUR::Session& sess, co set_color (unique_random_color()); } - new Shiva (*_route, *this); + new PairedShiva (*_route, *this); _route->active_changed.connect (mem_fun (*this, &RouteUI::route_active_changed)); -- cgit v1.2.3