summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-11-02 05:13:53 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-11-02 05:13:53 +0000
commit40a6f878a945d96e51839d036992521dd5883e05 (patch)
tree46352d6ea3f97068663a15242bdde087673a1217 /gtk2_ardour/editor.cc
parente31edb210810b250b61654a7a24e11f442a73da9 (diff)
allow track selection to be toggled (ctrl-clicked); potential fixes for tape display offset stuff, but in progress
git-svn-id: svn://localhost/ardour2/trunk@1057 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor.cc')
-rw-r--r--gtk2_ardour/editor.cc28
1 files changed, 17 insertions, 11 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index c0fd7b0a20..76731ea439 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -2828,33 +2828,29 @@ Editor::commit_reversible_command ()
}
bool
-Editor::set_selected_track_from_click (bool press, Selection::Operation op, bool with_undo, bool no_remove)
+Editor::set_selected_track (TimeAxisView& view, Selection::Operation op, bool no_remove)
{
bool commit = false;
- if (!clicked_trackview) {
- return false;
- }
-
switch (op) {
case Selection::Toggle:
- if (selection->selected (clicked_trackview)) {
+ if (selection->selected (&view)) {
if (!no_remove) {
- selection->remove (clicked_trackview);
+ selection->remove (&view);
commit = true;
}
} else {
- selection->add (clicked_trackview);
+ selection->add (&view);
commit = false;
}
break;
case Selection::Set:
- if (selection->selected (clicked_trackview) && selection->tracks.size() == 1) {
+ if (selection->selected (&view) && selection->tracks.size() == 1) {
/* no commit necessary */
}
- selection->set (clicked_trackview);
+ selection->set (&view);
break;
case Selection::Extend:
@@ -2866,7 +2862,17 @@ Editor::set_selected_track_from_click (bool press, Selection::Operation op, bool
}
bool
-Editor::set_selected_control_point_from_click (bool press, Selection::Operation op, bool with_undo, bool no_remove)
+Editor::set_selected_track_from_click (Selection::Operation op, bool no_remove)
+{
+ if (!clicked_trackview) {
+ return false;
+ }
+
+ return set_selected_track (*clicked_trackview, op, no_remove);
+}
+
+bool
+Editor::set_selected_control_point_from_click (Selection::Operation op, bool no_remove)
{
if (!clicked_control_point) {
return false;