X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fvwindowgui.C;h=d13197b4869f7f679b26f83acfc660de0bd2c67f;hb=02a79c110b1bce1d500849c82b2098863cd60424;hp=87909d2a604aab85a5d009e69cc586de5455c19d;hpb=eecf057a9d6b8c8cffc7d0001bff89bc9cac7b05;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/vwindowgui.C b/cinelerra-5.1/cinelerra/vwindowgui.C index 87909d2a..d13197b4 100644 --- a/cinelerra-5.1/cinelerra/vwindowgui.C +++ b/cinelerra-5.1/cinelerra/vwindowgui.C @@ -201,9 +201,9 @@ void VWindowGUI::update_sources(const char *title) void VWindowGUI::create_objects() { + lock_window("VWindowGUI::create_objects"); in_point = 0; out_point = 0; - lock_window("VWindowGUI::create_objects"); set_icon(mwindow->theme->get_image("vwindow_icon")); //printf("VWindowGUI::create_objects 1\n"); @@ -462,26 +462,22 @@ void VWindowGUI::drag_motion() int VWindowGUI::drag_stop() { - if(get_hidden()) return 0; + if( get_hidden() ) return 0; - if(highlighted && - mwindow->session->current_operation == DRAG_ASSET) - { + if( highlighted && + mwindow->session->current_operation == DRAG_ASSET ) { highlighted = 0; canvas->draw_refresh(); unlock_window(); - Indexable *indexable = mwindow->session->drag_assets->size() ? - mwindow->session->drag_assets->get(0) : - 0; - EDL *edl = mwindow->session->drag_clips->size() ? - mwindow->session->drag_clips->get(0) : - 0; - if(indexable) + Indexable *indexable = + mwindow->session->drag_assets->size() > 0 ? + (Indexable *)mwindow->session->drag_assets->get(0) : + mwindow->session->drag_clips->size() > 0 ? + (Indexable *)mwindow->session->drag_clips->get(0) : 0; + if( indexable ) vwindow->change_source(indexable); - else - if(edl) - vwindow->change_source(edl); + lock_window("VWindowGUI::drag_stop"); return 1; } @@ -861,6 +857,12 @@ void VWindowCanvas::draw_refresh(int flush) } } +int VWindowCanvas::need_overlays() +{ + if( gui->highlighted ) return 1; + return 0; +} + void VWindowCanvas::draw_overlays() { if( gui->highlighted )