batchrender hang on close, apply pref saves defaults, overwrite/splice tweaks, specif...
[goodguy/history.git] / cinelerra-5.1 / cinelerra / batchrender.C
index 8a1bc56f3f267ad3f93808b69392b4f3e1f16d97..4c5f1d4bac8b1375afda0e996fe89eb3a88f3cfa 100644 (file)
@@ -357,7 +357,7 @@ void BatchRenderThread::update_selected_edl()
         FileXML xml_file;
        char *path = get_current_edl();
        EDL *edl = mwindow->edl;
-        edl->save_xml(&xml_file, path, 0, 0);
+        edl->save_xml(&xml_file, path);
         xml_file.terminate_string();
         if( xml_file.write_to_file(path) ) {
                char msg[BCTEXTLEN];
@@ -672,6 +672,8 @@ BatchRenderGUI::BatchRenderGUI(MWindow *mwindow,
 BatchRenderGUI::~BatchRenderGUI()
 {
        lock_window("BatchRenderGUI::~BatchRenderGUI");
+       loadlist_batch->stop();
+       savelist_batch->stop();
        delete format_tools;
        unlock_window();
 }
@@ -996,16 +998,17 @@ BatchRenderSaveList::BatchRenderSaveList(BatchRenderThread *thread, int x, int y
 }
 
 BatchRenderSaveList::~BatchRenderSaveList()
+{
+       stop();
+       delete startup_lock;
+}
+
+void BatchRenderSaveList::stop()
 {
        startup_lock->lock("BatchRenderSaveList::~BrowseButton");
-       if( gui ) {
-               gui->lock_window();
-               gui->set_done(1);
-               gui->unlock_window();
-       }
+       if( gui ) gui->set_done(1);
        startup_lock->unlock();
        Thread::join();
-       delete startup_lock;
 }
 
 int BatchRenderSaveList::handle_event()
@@ -1046,7 +1049,6 @@ void BatchRenderSaveList::run()
                thread->save_jobs(thread->batch_path);
        }
 
-       this->thread->gui->flush();
        startup_lock->lock("BatchRenderLoadList::run");
        gui = 0;
        startup_lock->unlock();
@@ -1072,16 +1074,17 @@ BatchRenderLoadList::BatchRenderLoadList(BatchRenderThread *thread,
 }
 
 BatchRenderLoadList::~BatchRenderLoadList()
+{
+       stop();
+       delete startup_lock;
+}
+
+void BatchRenderLoadList::stop()
 {
        startup_lock->lock("BatchRenderLoadList::~BrowseButton");
-       if( gui ) {
-               gui->lock_window();
-               gui->set_done(1);
-               gui->unlock_window();
-       }
+       if( gui ) gui->set_done(1);
        startup_lock->unlock();
        Thread::join();
-       delete startup_lock;
 }
 
 int BatchRenderLoadList::handle_event()
@@ -1125,7 +1128,6 @@ void BatchRenderLoadList::run()
                thread->gui->change_job();
        }
 
-       thread->gui->flush();
        startup_lock->lock("BatchRenderLoadList::run");
        gui = 0;
        startup_lock->unlock();