diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-10-21 05:12:11 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-10-21 05:12:11 +0000 |
commit | fbb9576d4047c03276cc2e1b750465c3b0371c6c (patch) | |
tree | fb0ed6838c8565a7cdafcd5da63f41d7b87989a8 /gtk2_ardour | |
parent | 273d9fa8d6fc7fb0c16f805933040ed5962ff3d5 (diff) |
various fixes related to lifetime management and xfades in particular. lots and lots and lots of debugging output, but sampo can test startup now. shutdown will still crash, but for a new reason.
git-svn-id: svn://localhost/ardour2/trunk@998 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/editor.cc | 20 | ||||
-rw-r--r-- | gtk2_ardour/editor.h | 2 | ||||
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 2 |
3 files changed, 15 insertions, 9 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 99e1f5bb1e..eb3c3ac212 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -1691,7 +1691,7 @@ Editor::add_region_context_items (AudioStreamView* sv, boost::shared_ptr<Region> become selected. */ - region_menu->signal_map_event().connect (bind (mem_fun(*this, &Editor::set_selected_regionview_from_map_event), sv, region)); + region_menu->signal_map_event().connect (bind (mem_fun(*this, &Editor::set_selected_regionview_from_map_event), sv, boost::weak_ptr<Region>(region))); items.push_back (MenuElem (_("Popup region editor"), mem_fun(*this, &Editor::edit_region))); items.push_back (MenuElem (_("Raise to top layer"), mem_fun(*this, &Editor::raise_region_to_top))); @@ -3198,9 +3198,15 @@ Editor::set_selected_regionview_from_region_list (boost::shared_ptr<Region> regi } bool -Editor::set_selected_regionview_from_map_event (GdkEventAny* ev, StreamView* sv, boost::shared_ptr<Region> r) +Editor::set_selected_regionview_from_map_event (GdkEventAny* ev, StreamView* sv, boost::weak_ptr<Region> weak_r) { RegionView* rv; + boost::shared_ptr<Region> r (weak_r.lock()); + + if (!r) { + return true; + } + boost::shared_ptr<AudioRegion> ar; if ((ar = boost::dynamic_pointer_cast<AudioRegion> (r)) == 0) { @@ -3524,15 +3530,15 @@ Editor::zoom_focus_selection_done () string choice = zoom_focus_selector.get_active_text(); ZoomFocus focus_type = ZoomFocusLeft; - if (choice == _("Focus Left")) { + if (choice == _("Left")) { focus_type = ZoomFocusLeft; - } else if (choice == _("Focus Right")) { + } else if (choice == _("Right")) { focus_type = ZoomFocusRight; - } else if (choice == _("Focus Center")) { + } else if (choice == _("Center")) { focus_type = ZoomFocusCenter; - } else if (choice == _("Focus Playhead")) { + } else if (choice == _("Playhead")) { focus_type = ZoomFocusPlayhead; - } else if (choice == _("Focus Edit Cursor")) { + } else if (choice == _("Edit Cursor")) { focus_type = ZoomFocusEdit; } diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index c83a0da3a0..eb8f050d91 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -441,7 +441,7 @@ class Editor : public PublicEditor bool set_selected_regionview_from_click (bool press, Selection::Operation op = Selection::Set, bool no_track_remove=false); void set_selected_regionview_from_region_list (boost::shared_ptr<ARDOUR::Region> region, Selection::Operation op = Selection::Set); - bool set_selected_regionview_from_map_event (GdkEventAny*, StreamView*, boost::shared_ptr<ARDOUR::Region>); + bool set_selected_regionview_from_map_event (GdkEventAny*, StreamView*, boost::weak_ptr<ARDOUR::Region>); void collect_new_region_view (RegionView *); Gtk::Menu track_context_menu; diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 280804c94f..c7a10df5a0 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<Region>(*(arv->region().get()), &before, &arv->region()->get_state())); + // session->add_command (new MementoCommand<Region>(*(arv->region().get()), &before, &arv->region()->get_state())); } commit_reversible_command (); |