summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_selection.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-11-30 22:12:27 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-11-30 22:12:27 +0000
commit577f1571f8e8cf0dc5f6983ea5dd07cc6153f831 (patch)
tree1d904943ab3a5eb79c92e9babb7cc9fa72d4f5de /gtk2_ardour/editor_selection.cc
parentff519d31b43251d0e5cea6c992a6dbc6dd0b90ba (diff)
don't put NDF/DF in clocks if there is no DF/NDF alternative; make deselect-all and invert-selection operations work properly; fix bug in edit range determination with no selected marker; popup dialog when no range can be determined; add new WINDOW modifier to SConscript to allow different conventions on OS X and linux
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2730 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_selection.cc')
-rw-r--r--gtk2_ardour/editor_selection.cc34
1 files changed, 33 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc
index 61a128e618..c2dfa44dfb 100644
--- a/gtk2_ardour/editor_selection.cc
+++ b/gtk2_ardour/editor_selection.cc
@@ -1096,10 +1096,36 @@ Editor::get_edit_op_range (nframes64_t& start, nframes64_t& end) const
break;
case EditAtMouse:
+ /* use mouse + selected marker */
+ if (selection->markers.empty()) {
+ start = m;
+ end = session->audible_frame();
+ } else {
+ start = selection->markers.front()->position();
+ end = m;
+ }
+ break;
+
case EditAtSelectedMarker:
/* use mouse + selected marker */
if (selection->markers.empty()) {
- return false;
+
+ MessageDialog win (_("No edit range defined"),
+ false,
+ MESSAGE_INFO,
+ BUTTONS_OK);
+
+ win.set_secondary_text (
+ _("the edit point is Selected Marker\nbut there is no selected marker."));
+
+
+ win.set_default_response (RESPONSE_CLOSE);
+ win.set_position (Gtk::WIN_POS_MOUSE);
+ win.show_all();
+
+ win.run ();
+
+ return false; // NO RANGE
}
start = selection->markers.front()->position();
end = m;
@@ -1117,3 +1143,9 @@ Editor::get_edit_op_range (nframes64_t& start, nframes64_t& end) const
return true;
}
+
+void
+Editor::deselect_all ()
+{
+ selection->clear ();
+}