From ab1bc6b7d7e663bbfae9b12bc535ee0f30a8ca08 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 14 Apr 2020 17:37:06 +0200 Subject: Make import-dialog independent of only-copy preference This also fixes a logic error when "get_only_copy_imported_files" was unset. The condition under which "copy" was mandatory was rather convoluted, so this also provides a more consistent user-experience. --- gtk2_ardour/sfdb_ui.cc | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) (limited to 'gtk2_ardour') diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc index 70bcf7aabc..9fcdcc367e 100644 --- a/gtk2_ardour/sfdb_ui.cc +++ b/gtk2_ardour/sfdb_ui.cc @@ -1422,11 +1422,7 @@ SoundFileOmega::reset_options () to do embedding (or if we are importing a MIDI file). */ - if (UIConfiguration::instance().get_only_copy_imported_files()) { - copy_files_btn.set_sensitive (false); - } else { - copy_files_btn.set_sensitive (false); - } + copy_files_btn.set_sensitive (false); } bool same_size; @@ -1601,29 +1597,14 @@ SoundFileOmega::reset_options () * or any file if we are under nsm control */ must_copy |= _session->get_nsm_state() || have_a_midi_file || notebook.get_current_page() == 2; - if (UIConfiguration::instance().get_only_copy_imported_files()) { - - if (selection_can_be_embedded_with_links && !must_copy) { - copy_files_btn.set_sensitive (true); - } else { - if (must_copy) { - copy_files_btn.set_active (true); - } - copy_files_btn.set_sensitive (false); - } - - } else { - - if (must_copy) { - copy_files_btn.set_active (true); - } - copy_files_btn.set_sensitive (!must_copy); + if (must_copy || !selection_can_be_embedded_with_links) { + copy_files_btn.set_active (true); } + copy_files_btn.set_sensitive (!must_copy && selection_can_be_embedded_with_links); return true; } - bool SoundFileOmega::bad_file_message() { -- cgit v1.2.3