summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2017-02-10 22:12:28 +0100
committerPaul Davis <paul@linuxaudiosystems.com>2017-02-15 20:07:49 +0100
commit2cc94f88801fa98e7b06d782903ab48446d08287 (patch)
tree7f03877c224521160d2a6a2eaa1cf8e2109b8175 /gtk2_ardour/editor.cc
parent213cc1d320559c090fd2bc1748e6365382672888 (diff)
tentative steps in trying to fix region action sensitivity
Diffstat (limited to 'gtk2_ardour/editor.cc')
-rw-r--r--gtk2_ardour/editor.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index e4d2a126a1..4407dac256 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -1485,7 +1485,7 @@ Editor::action_pre_activated (Glib::RefPtr<Action> const & a)
What a carry on :(
*/
- sensitize_the_right_region_actions ();
+ sensitize_the_right_region_actions (false, !within_track_canvas);
_last_region_menu_was_main = true;
}
}
@@ -1717,7 +1717,7 @@ Editor::popup_track_context_menu (int button, int32_t time, ItemType item_type,
/* When the region menu is opened, we setup the actions so that they look right
in the menu.
*/
- sensitize_the_right_region_actions ();
+ sensitize_the_right_region_actions (true, false);
_last_region_menu_was_main = false;
menu->signal_hide().connect (sigc::bind (sigc::mem_fun (*this, &Editor::sensitize_all_region_actions), true));
@@ -4738,6 +4738,8 @@ Editor::get_preferred_edit_position (EditIgnoreOption ignore, bool from_context_
framepos_t where = 0;
EditPoint ep = _edit_point;
+ cerr << "ig " << ignore << " fcm " << from_context_menu << " foc " << from_outside_canvas << endl;
+
if (Profile->get_mixbus()) {
if (ep == EditAtSelectedMarker) {
ep = EditAtPlayhead;
@@ -4765,6 +4767,8 @@ Editor::get_preferred_edit_position (EditIgnoreOption ignore, bool from_context_
MusicFrame snap_mf (0, 0);
+ cerr << "Using EP " << enum_2_string (ep) << endl;
+
switch (ep) {
case EditAtPlayhead:
if (_dragging_playhead) {
@@ -4949,7 +4953,7 @@ Editor::get_regions_after (RegionSelection& rs, framepos_t where, const TrackVie
*/
RegionSelection
-Editor::get_regions_from_selection_and_edit_point ()
+Editor::get_regions_from_selection_and_edit_point (EditIgnoreOption ignore, bool from_context_menu, bool from_outside_canvas)
{
RegionSelection regions;
@@ -4966,7 +4970,7 @@ Editor::get_regions_from_selection_and_edit_point ()
/* no region selected or entered, but some selected tracks:
* act on all regions on the selected tracks at the edit point
*/
- framepos_t const where = get_preferred_edit_position ();
+ framepos_t const where = get_preferred_edit_position (ignore, from_outside_canvas, from_outside_canvas);
get_regions_at(regions, where, tracks);
}
}