rework set default transtion, nested proxy edl fixes, doubleclick proxy media fix...
[goodguy/history.git] / cinelerra-5.1 / cinelerra / preferencesthread.C
index b25075b8657fb1ce91113c74e9dcadd88abe76a6..01fb08b2357655fef946140f5dc1f6bc31817823 100644 (file)
@@ -32,6 +32,7 @@
 #include "bchash.h"
 #include "edl.h"
 #include "edlsession.h"
+#include "file.h"
 #include "filesystem.h"
 #include "fonts.h"
 #include "interfaceprefs.h"
@@ -225,15 +226,23 @@ int PreferencesThread::apply_settings()
                mwindow->gui->unlock_window();
                redraw_overlays = 1;
        }
+       PreferencesWindow *window = (PreferencesWindow*)get_gui();
+       if( window ) window->unlock_window();
+       mwindow->init_brender();
+       if( window ) window->lock_window("PreferencesThread::apply_settings 5");
 
        if( strcmp(preferences->theme, mwindow->preferences->theme) != 0 )
                mwindow->restart_status = -1; // reload, need new bcresources
        if( strcmp(preferences->plugin_icons, mwindow->preferences->plugin_icons) != 0 )
                mwindow->restart_status = -1;
+       if( strcmp(preferences->lv2_path, mwindow->preferences->lv2_path) != 0 ) {
+               MWindow::remove_plugin_index();
+               File::setenv_path("LV2_PATH", preferences->lv2_path, 1);
+               mwindow->restart_status = -1;
+       }
 
        mwindow->edl->copy_session(edl, 1);
        mwindow->preferences->copy_from(preferences);
-       mwindow->init_brender();
 
        BC_Signals::set_catch_segv(mwindow->preferences->trap_sigsegv);
        BC_Signals::set_catch_intr(mwindow->preferences->trap_sigintr);