pt import: Fix import -> cancel -> import by clearing status
This commit is contained in:
parent
5d0de7e037
commit
2645ab2e73
@ -90,6 +90,7 @@ Editor::external_pt_dialog ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
import_pt_status.all_done = false;
|
import_pt_status.all_done = false;
|
||||||
|
import_pt_status.clear();
|
||||||
|
|
||||||
ImportProgressWindow ipw (&import_pt_status, _("PT Import"), _("Cancel Import"));
|
ImportProgressWindow ipw (&import_pt_status, _("PT Import"), _("Cancel Import"));
|
||||||
pthread_create_and_store ("import_pt", &import_pt_status.thread, _import_pt_thread, this);
|
pthread_create_and_store ("import_pt", &import_pt_status.thread, _import_pt_thread, this);
|
||||||
|
@ -177,27 +177,19 @@ Session::import_sndfile_as_region (string path, SrcQuality quality, samplepos_t&
|
|||||||
void
|
void
|
||||||
Session::import_pt_sources (PTFFormat& ptf, ImportStatus& status)
|
Session::import_pt_sources (PTFFormat& ptf, ImportStatus& status)
|
||||||
{
|
{
|
||||||
vector<boost::shared_ptr<Region> > regions;
|
|
||||||
boost::shared_ptr<ARDOUR::Track> track;
|
|
||||||
ARDOUR::PluginInfoPtr instrument;
|
|
||||||
vector<string> to_import;
|
|
||||||
string fullpath;
|
string fullpath;
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
bool onefailed = false;
|
bool onefailed = false;
|
||||||
samplepos_t pos = -1;
|
samplepos_t pos = -1;
|
||||||
|
|
||||||
vector<struct ptflookup> ptfregpair;
|
|
||||||
vector<PTFFormat::wav_t>::const_iterator w;
|
vector<PTFFormat::wav_t>::const_iterator w;
|
||||||
uint32_t wth = 0;
|
uint32_t wth = 0;
|
||||||
|
|
||||||
SourceList just_one_src;
|
SourceList just_one_src;
|
||||||
|
|
||||||
boost::shared_ptr<AudioTrack> existing_track;
|
|
||||||
vector<struct ptflookup> usedtracks;
|
|
||||||
struct ptflookup utr;
|
|
||||||
|
|
||||||
ptfwavpair.clear();
|
ptfwavpair.clear();
|
||||||
pt_imported_sources.clear();
|
pt_imported_sources.clear();
|
||||||
|
status.clear();
|
||||||
|
|
||||||
for (w = ptf.audiofiles ().begin (); w != ptf.audiofiles ().end () && !status.cancel; ++w) {
|
for (w = ptf.audiofiles ().begin (); w != ptf.audiofiles ().end () && !status.cancel; ++w) {
|
||||||
struct ptflookup p;
|
struct ptflookup p;
|
||||||
|
Loading…
Reference in New Issue
Block a user