add master/armed_gang track operations, tweak appearanceprefs layout, fix vicon video...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / plugindialog.C
index f9c24fffb9c41c8948f2b254e9b6dabbe8fde1c6..fba1ae797e8652e58debdd7ae9a9fe7c45540a54 100644 (file)
@@ -435,6 +435,7 @@ void PluginDialog::apply()
 
 void PluginDialogThread::apply()
 {
+       Plugin *plugin = 0;
        if( mwindow->edl )
                mwindow->edl->session->single_standalone = single_standalone;
        if(plugin_type) {
@@ -444,16 +445,13 @@ void PluginDialogThread::apply()
                        mwindow->insert_effect(plugin_title, &shared_location,
                                data_type, plugin_type, single_standalone);
                }
-               else {
-                       Plugin *plugin = mwindow->edl->tracks->plugin_exists(plugin_id);
-                       if( plugin ) {
-                               plugin->change_plugin(plugin_title,
+               else if( (plugin=mwindow->edl->tracks->plugin_exists(plugin_id)) != 0 ) {
+                       plugin->change_plugin(plugin_title,
                                        &shared_location, plugin_type);
-                       }
-                       else if( mwindow->edl->tracks->track_exists(track) ) {
-                                       mwindow->insert_effect(plugin_title, &shared_location,
+               }
+               else if( mwindow->edl->tracks->track_exists(track) ) {
+                       mwindow->insert_effect(plugin_title, &shared_location,
                                        track, 0, 0, 0, plugin_type);
-                       }
                }
 
                mwindow->save_backup();