X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Fgraphic%2Fgraphic.C;h=f927679cd23673d6d79d102619f405a59d557a2e;hb=32582a27c8f7594ccb06a33a1f0662478a8acfff;hp=0fbf84eec9f984f35e992c4f2becd6c243ffab8f;hpb=21c2e6b36d6a96c2f662a89459d607b5a387f4eb;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/plugins/graphic/graphic.C b/cinelerra-5.1/plugins/graphic/graphic.C index 0fbf84ee..f927679c 100644 --- a/cinelerra-5.1/plugins/graphic/graphic.C +++ b/cinelerra-5.1/plugins/graphic/graphic.C @@ -1129,28 +1129,23 @@ void GraphicEQ::save_data(KeyFrame *keyframe) void GraphicEQ::update_gui() { - if(thread) - { - if(load_configuration() && - ((GraphicGUI*)thread->window)->canvas->state != GraphicCanvas::DRAG_POINT) - { - ((GraphicGUI*)thread->window)->lock_window("GraphicEQ::update_gui"); - ((GraphicGUI*)thread->window)->update_canvas(); - ((GraphicGUI*)thread->window)->update_textboxes(); - ((GraphicGUI*)thread->window)->unlock_window(); - } - else - { - int total_frames = get_gui_update_frames(); + if( !thread ) return; + GraphicGUI *window = (GraphicGUI *)thread->window; +//lock here for points, needed by window cursor_motion callback +// deleted in load_configuration by read_data + window->lock_window("GraphicEQ::update_gui"); + if( load_configuration() && + window->canvas->state != GraphicCanvas::DRAG_POINT ) { + window->update_canvas(); + window->update_textboxes(); + } + else { + int total_frames = get_gui_update_frames(); //printf("ParametricEQ::update_gui %d %d\n", __LINE__, total_frames); - if(total_frames) - { - ((GraphicGUI*)thread->window)->lock_window("GraphicEQ::update_gui"); - ((GraphicGUI*)thread->window)->update_canvas(); - ((GraphicGUI*)thread->window)->unlock_window(); - } - } + if( total_frames ) + window->update_canvas(); } + window->unlock_window(); } void GraphicEQ::reconfigure()