diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-12-06 15:59:01 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-12-06 15:59:01 +0000 |
commit | ba8953605dd8359f0ec8a2aacb51102deda05df7 (patch) | |
tree | 6fa8af85432a79a60ee9a4f0425911b42af51938 /gtk2_ardour/time_selection.cc | |
parent | 13a7612ef6b9f7956fe5de253d2503dfdf30c4b5 (diff) |
fix duplicate, and clarify its behaviour in smart mode; includes a fix for TimeSelection::length() which didn't account for "no selection" in its return value
git-svn-id: svn://localhost/ardour2/branches/3.0@13607 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/time_selection.cc')
-rw-r--r-- | gtk2_ardour/time_selection.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk2_ardour/time_selection.cc b/gtk2_ardour/time_selection.cc index 419d82dbcc..a0f33e8c99 100644 --- a/gtk2_ardour/time_selection.cc +++ b/gtk2_ardour/time_selection.cc @@ -103,5 +103,9 @@ TimeSelection::end_frame () framecnt_t TimeSelection::length() { + if (empty()) { + return 0; + } + return end_frame() - start() + 1; } |