Partially fix MIDI region trim and extend.

git-svn-id: svn://localhost/ardour2/trunk@2911 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard
2008-01-14 01:30:38 +00:00
parent 794917fca7
commit 5a1d3e851d
4 changed files with 9 additions and 6 deletions

View File

@@ -7,7 +7,7 @@
<Option name="waveform" value="000000cc"/>
<Option name="clipped waveform" value="ff0000e5"/>
<Option name="region base" value="bfbfc1aa"/>
<Option name="selected region base" value="b591a8ff"/>
<Option name="selected region base" value="565693a6"/>
<Option name="midi frame base" value="698f9d6d"/>
<Option name="audio track base" value="c6d3d868"/>
<Option name="audio bus base" value="dbd1ea68"/>

View File

@@ -76,6 +76,8 @@ class MidiSource : public Source
XMLNode& get_state ();
int set_state (const XMLNode&);
bool length_mutable() const { return true; }
virtual void load_model(bool lock=true, bool force_reload=false) = 0;
virtual void destroy_model() = 0;

View File

@@ -63,7 +63,8 @@ class Source : public SessionObject
XMLNode& get_state ();
int set_state (const XMLNode&);
virtual bool destructive() const { return false; }
virtual bool destructive() const { return false; }
virtual bool length_mutable() const { return false; }
void use () { _in_use++; }
void disuse () { if (_in_use) { _in_use--; } }

View File

@@ -1310,7 +1310,7 @@ Region::source_equivalent (boost::shared_ptr<const Region> other) const
bool
Region::verify_length (nframes_t len)
{
if (source() && source()->destructive()) {
if (source() && (source()->destructive() || source()->length_mutable())) {
return true;
}
@@ -1328,7 +1328,7 @@ Region::verify_length (nframes_t len)
bool
Region::verify_start_and_length (nframes_t new_start, nframes_t& new_length)
{
if (source() && source()->destructive()) {
if (source() && (source()->destructive() || source()->length_mutable())) {
return true;
}
@@ -1346,7 +1346,7 @@ Region::verify_start_and_length (nframes_t new_start, nframes_t& new_length)
bool
Region::verify_start (nframes_t pos)
{
if (source() && source()->destructive()) {
if (source() && (source()->destructive() || source()->length_mutable())) {
return true;
}
@@ -1361,7 +1361,7 @@ Region::verify_start (nframes_t pos)
bool
Region::verify_start_mutable (nframes_t& new_start)
{
if (source() && source()->destructive()) {
if (source() && (source()->destructive() || source()->length_mutable())) {
return true;
}