T: always unconditionally copies imported files to the session
This commit is contained in:
parent
6d757c8c3c
commit
3d13b28a24
@ -449,7 +449,7 @@ Editor::drop_paths_part_two (const vector<string>& paths, timepos_t const & p, d
|
||||
InstrumentSelector is(InstrumentSelector::ForTrackDefault); // instantiation builds instrument-list and sets default.
|
||||
do_import (midi_paths, Editing::ImportDistinctFiles, ImportAsTrack, SrcBest, SMFFileAndTrackName, SMFTempoIgnore, pos, is.selected_instrument());
|
||||
|
||||
if (UIConfiguration::instance().get_only_copy_imported_files() || copy) {
|
||||
if (Profile->get_livetrax() || UIConfiguration::instance().get_only_copy_imported_files() || copy) {
|
||||
do_import (audio_paths, Editing::ImportDistinctFiles, Editing::ImportAsTrack,
|
||||
SrcBest, SMFFileAndTrackName, SMFTempoIgnore, pos);
|
||||
} else {
|
||||
@ -464,7 +464,7 @@ Editor::drop_paths_part_two (const vector<string>& paths, timepos_t const & p, d
|
||||
do_import (midi_paths, Editing::ImportSerializeFiles, ImportToTrack,
|
||||
SrcBest, SMFFileAndTrackName, SMFTempoIgnore, pos, std::shared_ptr<ARDOUR::PluginInfo>(), tv->track ());
|
||||
|
||||
if (UIConfiguration::instance().get_only_copy_imported_files() || copy) {
|
||||
if (Profile->get_livetrax() || UIConfiguration::instance().get_only_copy_imported_files() || copy) {
|
||||
do_import (audio_paths, Editing::ImportSerializeFiles, Editing::ImportToTrack,
|
||||
SrcBest, SMFFileAndTrackName, SMFTempoIgnore, pos, std::shared_ptr<PluginInfo>(), tv->track ());
|
||||
} else {
|
||||
|
@ -1355,7 +1355,7 @@ Editor::track_canvas_drag_motion (Glib::RefPtr<Gdk::DragContext> const& context,
|
||||
* TODO: check if file is audio/midi, allow drops on same track-type only,
|
||||
* currently: if audio is dropped on a midi-track, it is only added to the region-list
|
||||
*/
|
||||
if (UIConfiguration::instance().get_only_copy_imported_files()) {
|
||||
if (Profile->get_livetrax() || UIConfiguration::instance().get_only_copy_imported_files()) {
|
||||
context->drag_status(Gdk::ACTION_COPY, time);
|
||||
} else {
|
||||
if ((context->get_actions() & (Gdk::ACTION_COPY | Gdk::ACTION_LINK | Gdk::ACTION_MOVE)) == Gdk::ACTION_COPY) {
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "ardour/audiofilesource.h"
|
||||
#include "ardour/profile.h"
|
||||
#include "ardour/region_factory.h"
|
||||
#include "ardour/session.h"
|
||||
#include "ardour/session_directory.h"
|
||||
@ -292,7 +293,7 @@ EditorSources::drag_data_received (const RefPtr<Gdk::DragContext>& context,
|
||||
timepos_t pos;
|
||||
bool copy = ((context->get_actions () & (Gdk::ACTION_COPY | Gdk::ACTION_LINK | Gdk::ACTION_MOVE)) == Gdk::ACTION_COPY);
|
||||
|
||||
if (UIConfiguration::instance ().get_only_copy_imported_files () || copy) {
|
||||
if (Profile->get_livetrax() || UIConfiguration::instance ().get_only_copy_imported_files () || copy) {
|
||||
_editor->do_import (paths, Editing::ImportDistinctFiles, Editing::ImportAsRegion,
|
||||
SrcBest, SMFFileAndTrackName, SMFTempoIgnore, pos);
|
||||
} else {
|
||||
|
@ -981,15 +981,6 @@ RCOptionEditor::RCOptionEditor ()
|
||||
|
||||
add_option (_("General"), new OptionEditorHeading (_("Import")));
|
||||
|
||||
add_option (_("General"),
|
||||
new BoolOption (
|
||||
"only-copy-imported-files",
|
||||
_("Drag and drop import always copies files to session"),
|
||||
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_only_copy_imported_files),
|
||||
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_only_copy_imported_files)
|
||||
));
|
||||
|
||||
|
||||
add_option (_("General"),
|
||||
new DirectoryOption (
|
||||
X_("freesound-dir"),
|
||||
|
@ -1983,7 +1983,9 @@ SoundFileOmega::SoundFileOmega (string title, ARDOUR::Session* s,
|
||||
options.attach (*l, 6, 7, 0, 1, FILL, SHRINK, 4, 0);
|
||||
options.attach (src_combo, 7, 8, 0, 1, FILL, SHRINK, 2, 0);
|
||||
|
||||
#ifndef LIVETRAX
|
||||
options.attach (copy_files_btn, 7, 8, 1, 2, FILL, SHRINK, 2, 0);
|
||||
#endif
|
||||
|
||||
str.clear ();
|
||||
str.push_back (_("by track number"));
|
||||
@ -2272,7 +2274,7 @@ SoundFileOmega::do_something (int action)
|
||||
|
||||
_import_active = true;
|
||||
|
||||
if (copy_files_btn.get_active()) {
|
||||
if (Profile->get_livetrax() || copy_files_btn.get_active()) {
|
||||
PublicEditor::instance().do_import (paths, chns, mode, quality, mts, mtd, where, instrument, std::shared_ptr<Track>(), with_midi_markers);
|
||||
} else {
|
||||
PublicEditor::instance().do_embed (paths, chns, mode, where, instrument);
|
||||
|
Loading…
Reference in New Issue
Block a user