allow the use of static_cast for MGR ghost events (speeds things up a bit).
[ardour.git] / gtk2_ardour / editor_selection.cc
index ea6c40f1b29a7a8a3bf9bb96a42fd0db55e2c142..b45ff8c1bb3e515d6e036c12bb03bf68fc3e5c3c 100644 (file)
@@ -43,7 +43,7 @@
 #include "midi_region_view.h"
 #include "sfdb_ui.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace std;
 using namespace ARDOUR;
@@ -879,7 +879,12 @@ Editor::set_selected_regionview_from_click (bool press, Selection::Operation op)
                if (!regions.empty()) {
                        selection->add (regions);
                        commit = true;
+               } else if (selection->regions.empty() && !selection->selected (clicked_regionview)) {
+                       /* ensure that at least the clicked regionview is selected. */
+                       selection->set (clicked_regionview);
+                       commit = true;
                }
+
        }
 
 out:
@@ -1246,7 +1251,6 @@ Editor::sensitize_the_right_region_actions ()
                _region_actions->get_action("set-region-sync-position")->set_sensitive (false);
                _region_actions->get_action("trim-front")->set_sensitive (false);
                _region_actions->get_action("trim-back")->set_sensitive (false);
-               _region_actions->get_action("split-region")->set_sensitive (false);
                _region_actions->get_action("place-transient")->set_sensitive (false);
        }
 
@@ -1383,10 +1387,6 @@ Editor::region_selection_changed ()
                }
        }
 
-       if (_session && !_session->transport_rolling() && !selection->regions.empty()) {
-               maybe_locate_with_edit_preroll (selection->regions.start());
-       }
-
        /* propagate into backend */
 
        if (_session) {