summaryrefslogtreecommitdiff
path: root/gtk2_ardour/region_selection.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/region_selection.cc')
-rw-r--r--gtk2_ardour/region_selection.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/gtk2_ardour/region_selection.cc b/gtk2_ardour/region_selection.cc
index d887021a42..a418b1de23 100644
--- a/gtk2_ardour/region_selection.cc
+++ b/gtk2_ardour/region_selection.cc
@@ -79,23 +79,19 @@ RegionSelection::clear_all()
{
clear();
_bylayer.clear();
+ _current_start = 0;
+ _current_end = 0;
}
bool RegionSelection::contains (RegionView* rv)
{
- if (this->find (rv) != end()) {
- return true;
- }
- else {
- return false;
- }
-
+ return this->find (rv) != end();
}
void
RegionSelection::add (RegionView* rv, bool dosort)
{
- if (this->find (rv) != end()) {
+ if (contains (rv)) {
/* we already have it */
return;
}