summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2017-02-15 19:00:28 +0100
committerPaul Davis <paul@linuxaudiosystems.com>2017-02-15 20:07:49 +0100
commit3d3f2a79f619ef9725f113a48c1de4fcf9d33ac7 (patch)
tree054c5782b26a08a05a17f3c08d68f45050cb2e41 /gtk2_ardour/editor.cc
parent0a41daa932a0f742c7dc7a14c02ae93baa12903a (diff)
use leave/enter from track canvas to be the primary driver of region action sensitivity
This works for context menus also, because GTK sends us leave/enter notify events when they appear.
Diffstat (limited to 'gtk2_ardour/editor.cc')
-rw-r--r--gtk2_ardour/editor.cc25
1 files changed, 1 insertions, 24 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 4407dac256..b13e2517c3 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -1466,31 +1466,12 @@ Editor::set_session (Session *t)
_session->register_with_memento_command_factory(id(), this);
_session->register_with_memento_command_factory(_selection_memento->id(), _selection_memento);
- ActionManager::ui_manager->signal_pre_activate().connect (sigc::mem_fun (*this, &Editor::action_pre_activated));
-
LuaInstance::instance()->set_session(_session);
start_updating_meters ();
}
void
-Editor::action_pre_activated (Glib::RefPtr<Action> const & a)
-{
- if (a->get_name() == "RegionMenu") {
- /* When the main menu's region menu is opened, we setup the actions so that they look right
- in the menu. I can't find a way of getting a signal when this menu is subsequently closed,
- so we resensitize all region actions when the entered regionview or the region selection
- changes. HOWEVER we can't always resensitize on entered_regionview change because that
- happens after the region context menu is opened. So we set a flag here, too.
-
- What a carry on :(
- */
- sensitize_the_right_region_actions (false, !within_track_canvas);
- _last_region_menu_was_main = true;
- }
-}
-
-void
Editor::fill_xfade_menu (Menu_Helpers::MenuList& items, bool start)
{
using namespace Menu_Helpers;
@@ -4738,8 +4719,6 @@ 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;
@@ -4767,8 +4746,6 @@ 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) {
@@ -4970,7 +4947,7 @@ Editor::get_regions_from_selection_and_edit_point (EditIgnoreOption ignore, bool
/* 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 (ignore, from_outside_canvas, from_outside_canvas);
+ framepos_t const where = get_preferred_edit_position (ignore, from_context_menu, from_outside_canvas);
get_regions_at(regions, where, tracks);
}
}