picon dirs, new cinfinity picons, plugin info, rework text drawing, show msg, compres...
[goodguy/history.git] / cinelerra-5.1 / plugins / compressor / compressor.C
index 481988bd16150fb1f9579503c61c0a21750a292a..54405a4c819ea70c468c04e95f6001b99561a025 100644 (file)
@@ -189,15 +189,13 @@ void CompressorEffect::save_data(KeyFrame *keyframe)
 
 void CompressorEffect::update_gui()
 {
-       if(thread)
-       {
-               if(load_configuration())
-               {
-                       thread->window->lock_window("CompressorEffect::update_gui");
-                       ((CompressorWindow*)thread->window)->update();
-                       thread->window->unlock_window();
-               }
-       }
+       if( !thread ) return;
+       CompressorWindow *window = (CompressorWindow*)thread->window;
+// load_configuration,read_data deletes levels
+       window->lock_window("CompressorEffect::update_gui");
+       if( load_configuration() )
+               window->update();
+       window->unlock_window();
 }
 
 
@@ -1073,6 +1071,7 @@ CompressorCanvas::CompressorCanvas(CompressorEffect *plugin, int x, int y, int w
 {
        this->plugin = plugin;
        current_operation = NONE;
+       current_point = 0;
 }
 
 int CompressorCanvas::button_press_event()