Stop surprising autoscroll when trimming regions; hopefully addresses #2993.
git-svn-id: svn://localhost/ardour2/branches/3.0@6498 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
|
||||
*/
|
||||
|
||||
#define __STDC_LIMIT_MACROS 1
|
||||
#include <stdint.h>
|
||||
#include "pbd/memento_command.h"
|
||||
#include "pbd/basename.h"
|
||||
#include "ardour/diskstream.h"
|
||||
@@ -1892,6 +1894,22 @@ TrimDrag::aborted ()
|
||||
}
|
||||
}
|
||||
|
||||
pair<nframes64_t, nframes64_t>
|
||||
TrimDrag::extent () const
|
||||
{
|
||||
pair<nframes64_t, nframes64_t> e = make_pair (INT64_MAX, 0);
|
||||
|
||||
for (list<RegionView*>::const_iterator i = _views.begin(); i != _views.end(); ++i) {
|
||||
boost::shared_ptr<Region> r = (*i)->region ();
|
||||
pair<nframes64_t, nframes64_t> const t = make_pair (r->position(), r->position() + r->length ());
|
||||
e.first = min (e.first, t.first);
|
||||
e.second = max (e.second, t.second);
|
||||
}
|
||||
|
||||
return e;
|
||||
}
|
||||
|
||||
|
||||
MeterMarkerDrag::MeterMarkerDrag (Editor* e, ArdourCanvas::Item* i, bool c)
|
||||
: Drag (e, i),
|
||||
_copy (c)
|
||||
|
||||
@@ -224,7 +224,7 @@ public:
|
||||
RegionDrag (Editor *, ArdourCanvas::Item *, RegionView *, std::list<RegionView*> const &);
|
||||
virtual ~RegionDrag () {}
|
||||
|
||||
std::pair<nframes64_t, nframes64_t> extent () const;
|
||||
virtual std::pair<nframes64_t, nframes64_t> extent () const;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -412,6 +412,8 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
std::pair<nframes64_t, nframes64_t> extent () const;
|
||||
|
||||
private:
|
||||
|
||||
Operation _operation;
|
||||
|
||||
Reference in New Issue
Block a user