X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fvwindowgui.C;h=92505781fac1330d60857aaf3f4afb50d77efc45;hb=a95193c3fd88733d184f2d460eca1fe6ddf8af28;hp=e3f323c526e08acd98c56b05b5e682376a317e89;hpb=b9f98da8f1cd8b7b31ead02fa41f299b56cac3da;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/vwindowgui.C b/cinelerra-5.1/cinelerra/vwindowgui.C index e3f323c5..92505781 100644 --- a/cinelerra-5.1/cinelerra/vwindowgui.C +++ b/cinelerra-5.1/cinelerra/vwindowgui.C @@ -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_clips->size() > 0 ? + (Indexable *)mwindow->session->drag_clips->get(0) : + mwindow->session->drag_assets->size() > 0 ? + (Indexable *)mwindow->session->drag_assets->get(0) : 0; + if( indexable ) vwindow->change_source(indexable); - else - if(edl) - vwindow->change_source(edl); + lock_window("VWindowGUI::drag_stop"); return 1; }