add left/right side trim cursors and use them for region trimming, as appropriate
[ardour.git] / libs / ardour / source.cc
index 10b7ead270d390d56ada6328c38fd33961b08b8a..5ec9631e40ba9684c34f633d29c50ee64db4f3b7 100644 (file)
@@ -45,6 +45,7 @@
 
 using namespace std;
 using namespace ARDOUR;
+using namespace PBD;
 
 Source::Source (Session& s, DataType type, const string& name, Flag flags)
        : SessionObject(s, name)
@@ -75,11 +76,9 @@ Source::Source (Session& s, const XMLNode& node)
 
 Source::~Source ()
 {
-       notify_callbacks ();
-       DEBUG_TRACE (DEBUG::Destruction, string_compose ("Source %1 deleted\n", _name));
+       DEBUG_TRACE (DEBUG::Destruction, string_compose ("Source %1 destructor %2\n", _name, this));
 }
 
-
 void
 Source::fix_writable_flags ()
 {
@@ -239,10 +238,12 @@ Source::check_for_analysis_data_on_disk ()
 void
 Source::mark_for_remove ()
 {
-       // This operation is not allowed for sources for destructive tracks or embedded files.
-       // Fortunately mark_for_remove() is never called for embedded files. This function
-       // must be fixed if that ever happens.
-       if (_flags & Destructive) {
+       // This operation is not allowed for sources for destructive tracks or out-of-session files.
+
+       /* XXX need a way to detect _within_session() condition here - move it from FileSource? 
+        */
+
+       if ((_flags & Destructive)) { 
                return;
        }