X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Fgraphic%2Fgraphic.C;h=f927679cd23673d6d79d102619f405a59d557a2e;hp=0fbf84eec9f984f35e992c4f2becd6c243ffab8f;hb=a91176d7510310919776d0250d5708bb244d440b;hpb=c8c97de4bed1b06c686fe7155e41ecb85d633b34 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()