Partially fix MIDI region trim and extend.
authorDavid Robillard <d@drobilla.net>
Mon, 14 Jan 2008 01:30:38 +0000 (01:30 +0000)
committerDavid Robillard <d@drobilla.net>
Mon, 14 Jan 2008 01:30:38 +0000 (01:30 +0000)
git-svn-id: svn://localhost/ardour2/trunk@2911 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/ardour3_ui_default.conf
libs/ardour/ardour/midi_source.h
libs/ardour/ardour/source.h
libs/ardour/region.cc

index 42f5741e4dd0a1af622d56458649a0d1c180ca17..8525908cf091f26f4271f3a6d00c376507240933 100644 (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"/>
index 433e7ceee95c9d72edc3d05214bc46832f647ef9..c83debec3ddbe51f8807ccd1d84f89984da94acc 100644 (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;
index 869111bb0784a404498dce37704576b95c8892f6..aa8bc0ca1f4267680af7cd428933995f7ab9dca3 100644 (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--; } }
index 0505985aea922a38d6c132133d1cb1f21c8f7047..6d92c0bc88cc8772360de1bd3efece23aa63299b 100644 (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;
        }