Re-import exported files at the export-range's start time.
This commit is contained in:
parent
3ae73eb242
commit
22b81901b0
|
@ -370,7 +370,7 @@ ExportDialog::do_export ()
|
||||||
|
|
||||||
_files_to_reimport.clear ();
|
_files_to_reimport.clear ();
|
||||||
Session::Exported.connect_same_thread (*this, sigc::bind (
|
Session::Exported.connect_same_thread (*this, sigc::bind (
|
||||||
[] (std::string, std::string fn, bool re, std::vector<std::string>* v) { if (re) { (*v).push_back (fn); } },
|
[] (std::string, std::string fn, bool re, samplepos_t pos, ReImportMap* v) { if (re) { (*v)[pos].push_back (fn); } },
|
||||||
&_files_to_reimport));
|
&_files_to_reimport));
|
||||||
|
|
||||||
handler->do_export ();
|
handler->do_export ();
|
||||||
|
@ -408,9 +408,11 @@ ExportDialog::show_progress ()
|
||||||
status->finish (TRS_UI);
|
status->finish (TRS_UI);
|
||||||
|
|
||||||
if (!status->aborted() && !_files_to_reimport.empty ()) {
|
if (!status->aborted() && !_files_to_reimport.empty ()) {
|
||||||
timepos_t pos (0);
|
for (auto const& x : _files_to_reimport) {
|
||||||
|
timepos_t pos (x.first);
|
||||||
Editing::ImportDisposition disposition = Editing::ImportDistinctFiles;
|
Editing::ImportDisposition disposition = Editing::ImportDistinctFiles;
|
||||||
editor.do_import (_files_to_reimport, disposition, Editing::ImportAsTrack, SrcBest, SMFTrackNumber, SMFTempoIgnore, pos);
|
editor.do_import (x.second, disposition, Editing::ImportAsTrack, SrcBest, SMFTrackNumber, SMFTempoIgnore, pos);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!status->aborted() && UIConfiguration::instance().get_save_export_mixer_screenshot ()) {
|
if (!status->aborted() && UIConfiguration::instance().get_save_export_mixer_screenshot ()) {
|
||||||
|
|
|
@ -127,7 +127,8 @@ private:
|
||||||
PublicEditor & editor;
|
PublicEditor & editor;
|
||||||
StatusPtr status;
|
StatusPtr status;
|
||||||
|
|
||||||
std::vector<std::string> _files_to_reimport;
|
typedef std::map<samplepos_t, std::vector<std::string>> ReImportMap;
|
||||||
|
ReImportMap _files_to_reimport;
|
||||||
|
|
||||||
/* Warning area */
|
/* Warning area */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user