Make sure every imported file is copied to the session path
authorRoy Vegard Ovesen <roy.vegard.ovesen@gmail.com>
Sat, 30 Mar 2013 18:12:31 +0000 (19:12 +0100)
committerRoy Vegard Ovesen <roy.vegard.ovesen@gmail.com>
Sun, 31 Mar 2013 01:59:10 +0000 (03:59 +0200)
gtk2_ardour/ardour_ui.cc
gtk2_ardour/sfdb_ui.cc
libs/ardour/ardour/session.h
libs/ardour/session.cc

index edd57251b2a9f4f685b45d4a3a17f91e5d282b42..3d148a973565c9d693029cca04434d3070501283 100644 (file)
@@ -682,6 +682,9 @@ ARDOUR_UI::startup ()
                exit (1);
        }
 
+       if (_session && nsm) {
+               _session->set_nsm_state( true );
+       }
        use_config ();
 
        goto_editor_window ();
index 3383cf3ff9d9d380e54bf2796e2fdbf8b7bcd60f..8916a53971af270b666d9178ef853d904179d1dc 100644 (file)
@@ -1339,8 +1339,9 @@ SoundFileOmega::reset_options ()
                src_combo.set_sensitive (false);
        }
 
-       /* We must copy MIDI files or those from Freesound */
-       bool const must_copy = have_a_midi_file || notebook.get_current_page() == 2;
+       /* We must copy MIDI files or those from Freesound
+        * or any file if we are under nsm control */
+       bool const must_copy = _session->get_nsm_state() || have_a_midi_file || notebook.get_current_page() == 2;
        
        if (Config->get_only_copy_imported_files()) {
 
index cb7f0ee0157104ba118ae002ae6050e1438fd3f3..f0a2fd118921c29a1ee1b38a89eef4ba4c612428 100644 (file)
@@ -392,6 +392,8 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        void rename_state (std::string old_name, std::string new_name);
        void remove_pending_capture_state ();
        int rename (const std::string&);
+       bool get_nsm_state () const { return _under_nsm_control; }
+       void set_nsm_state (bool state) { _under_nsm_control = state; }
 
        PBD::Signal1<void,std::string> StateSaved;
        PBD::Signal0<void> StateReady;
@@ -925,6 +927,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        uint32_t                _solo_isolated_cnt;
        bool                    _writable;
        bool                    _was_seamless;
+       bool                    _under_nsm_control;
 
        void initialize_latencies ();
        void set_worst_io_latencies ();
index 75303251d83138d824ee32b574063e389159779c..0e03efa9458d7bae99dfae688edbb9b1d1d59685 100644 (file)
@@ -133,6 +133,7 @@ Session::Session (AudioEngine &eng,
        : _engine (eng)
        , _target_transport_speed (0.0)
        , _requested_return_frame (-1)
+       , _under_nsm_control (false)
        , _session_dir (new SessionDirectory(fullpath))
        , state_tree (0)
        , _state_of_the_state (Clean)