Modify region trim cursor if a region can only be trimmed in one direction.

git-svn-id: svn://localhost/ardour2/branches/3.0@8045 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington
2010-11-15 22:55:39 +00:00
parent 90172686b9
commit ee76685f8d
7 changed files with 40 additions and 31 deletions

View File

@@ -9,14 +9,14 @@ class Trimmable {
virtual ~Trimmable() {}
enum CanTrim {
FrontTrimEarlier,
FrontTrimLater,
EndTrimEarlier,
EndTrimLater,
TopTrimUp,
TopTrimDown,
BottomTrimUp,
BottomTrimDown
FrontTrimEarlier = 0x1,
FrontTrimLater = 0x2,
EndTrimEarlier = 0x4,
EndTrimLater = 0x8,
TopTrimUp = 0x10,
TopTrimDown = 0x20,
BottomTrimUp = 0x40,
BottomTrimDown = 0x80
} ;
virtual CanTrim can_trim() const {

View File

@@ -1607,7 +1607,7 @@ Region::can_trim () const
}
if (!_sources.empty()) {
if (last_frame() < _sources.front()->length (0)) {
if ((start() + length()) < _sources.front()->length (0)) {
ct = CanTrim (ct | EndTrimLater);
}
}