summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_keys.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-11-08 05:06:23 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-11-08 05:06:23 +0000
commit62941af2cf8da4c5424afb9173fdb310c2c23eef (patch)
treef671f3a58da36af1694375054c2dfd6a2724aa52 /gtk2_ardour/editor_keys.cc
parentc61de034c7271b0334ade1325a674702e026bc13 (diff)
change kbd selection to F1 & F2; make kbd selection differentiate between rolling and not rolling conditions, using mouse location for not rolling; marker selection starts tobe used; markers get lines when selected; hide marker_grab_line now
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2608 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_keys.cc')
-rw-r--r--gtk2_ardour/editor_keys.cc34
1 files changed, 28 insertions, 6 deletions
diff --git a/gtk2_ardour/editor_keys.cc b/gtk2_ardour/editor_keys.cc
index b3081e8c8a..065560aa54 100644
--- a/gtk2_ardour/editor_keys.cc
+++ b/gtk2_ardour/editor_keys.cc
@@ -42,13 +42,24 @@ void
Editor::keyboard_selection_finish (bool add)
{
if (session && have_pending_keyboard_selection) {
- begin_reversible_command (_("keyboard selection"));
+
+ nframes64_t end;
+ bool ignored;
+
+ if (session->transport_rolling()) {
+ end = session->audible_frame();
+ } else {
+ if (!mouse_frame (end, ignored)) {
+ return;
+ }
+ }
+
if (add) {
- selection->add (pending_keyboard_selection_start, session->audible_frame());
+ selection->add (pending_keyboard_selection_start, end);
} else {
- selection->set (0, pending_keyboard_selection_start, session->audible_frame());
+ selection->set (0, pending_keyboard_selection_start, end);
}
- commit_reversible_command ();
+
have_pending_keyboard_selection = false;
}
}
@@ -57,8 +68,19 @@ void
Editor::keyboard_selection_begin ()
{
if (session) {
- pending_keyboard_selection_start = session->audible_frame();
- have_pending_keyboard_selection = true;
+ if (session->transport_rolling()) {
+ pending_keyboard_selection_start = session->audible_frame();
+ have_pending_keyboard_selection = true;
+ } else {
+ bool ignored;
+ nframes64_t where; // XXX fix me
+
+ if (mouse_frame (where, ignored)) {
+ pending_keyboard_selection_start = where;
+ have_pending_keyboard_selection = true;
+ }
+
+ }
}
}