summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_ops.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-04-04 03:26:08 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-04-04 03:26:08 +0000
commitf7c82c69113419a8db083f0095044af5ad4c872c (patch)
tree158067acc6c957b2f973802c089878812134b2b0 /gtk2_ardour/editor_ops.cc
parentaf5815e79bcd2a17edbdf5d45f1c7df02af546d8 (diff)
a) start at creating ControlProtocol objects
b) basic support for Frontier Design Tranzport c) probably broke some aspect of existing generic MIDI feedback git-svn-id: svn://localhost/trunk/ardour2@441 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r--gtk2_ardour/editor_ops.cc50
1 files changed, 22 insertions, 28 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index f78ecbbcbe..03ea5ac456 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -1394,10 +1394,6 @@ Editor::set_selection_from_loop()
void
Editor::set_selection_from_range (Location& loc)
{
- if (clicked_trackview == 0) {
- return;
- }
-
begin_reversible_command (_("set selection from range"));
selection->set (0, loc.start(), loc.end());
commit_reversible_command ();
@@ -1408,13 +1404,8 @@ Editor::set_selection_from_range (Location& loc)
void
Editor::select_all_selectables_using_time_selection ()
{
-
list<Selectable *> touched;
- if (clicked_trackview == 0) {
- return;
- }
-
if (selection->time.empty()) {
return;
}
@@ -1432,10 +1423,10 @@ Editor::select_all_selectables_using_time_selection ()
}
(*iter)->get_selectables (start, end - 1, 0, DBL_MAX, touched);
}
+
begin_reversible_command (_("select all from range"));
selection->set (touched);
commit_reversible_command ();
-
}
@@ -1491,18 +1482,19 @@ Editor::select_all_selectables_using_cursor (Cursor *cursor, bool after)
list<Selectable *> touched;
if (after) {
- begin_reversible_command (_("select all after cursor"));
- start = cursor->current_frame ;
- end = session->current_end_frame();
+ begin_reversible_command (_("select all after cursor"));
+ start = cursor->current_frame ;
+ end = session->current_end_frame();
} else {
- if (cursor->current_frame > 0) {
- begin_reversible_command (_("select all before cursor"));
- start = 0;
- end = cursor->current_frame - 1;
- } else {
- return;
- }
+ if (cursor->current_frame > 0) {
+ begin_reversible_command (_("select all before cursor"));
+ start = 0;
+ end = cursor->current_frame - 1;
+ } else {
+ return;
+ }
}
+
for (TrackViewList::iterator iter = track_views.begin(); iter != track_views.end(); ++iter) {
if ((*iter)->hidden()) {
continue;
@@ -1520,19 +1512,21 @@ Editor::select_all_selectables_between_cursors (Cursor *cursor, Cursor *other_cu
jack_nframes_t end;
list<Selectable *> touched;
bool other_cursor_is_first = cursor->current_frame > other_cursor->current_frame;
+
if (cursor->current_frame == other_cursor->current_frame) {
- return;
+ return;
}
- begin_reversible_command (_("select all between cursors"));
- if ( other_cursor_is_first) {
- start = other_cursor->current_frame;
- end = cursor->current_frame - 1;
+ begin_reversible_command (_("select all between cursors"));
+ if (other_cursor_is_first) {
+ start = other_cursor->current_frame;
+ end = cursor->current_frame - 1;
+
} else {
- start = cursor->current_frame;
- end = other_cursor->current_frame - 1;
+ start = cursor->current_frame;
+ end = other_cursor->current_frame - 1;
}
-
+
for (TrackViewList::iterator iter = track_views.begin(); iter != track_views.end(); ++iter) {
if ((*iter)->hidden()) {
continue;