From: Good Guy Date: Sat, 10 Mar 2018 16:46:46 +0000 (-0700) Subject: open asset/clip viewers en masse X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=404606b5c3b61c130942879de8bf4c4c95854cb0;p=goodguy%2Fhistory.git open asset/clip viewers en masse --- diff --git a/cinelerra-5.1/cinelerra/assetpopup.C b/cinelerra-5.1/cinelerra/assetpopup.C index b7aafa0d..07cc8eb4 100644 --- a/cinelerra-5.1/cinelerra/assetpopup.C +++ b/cinelerra-5.1/cinelerra/assetpopup.C @@ -270,18 +270,18 @@ AssetPopupViewWindow::~AssetPopupViewWindow() int AssetPopupViewWindow::handle_event() { -// Find window with nothing - VWindow *vwindow = mwindow->get_viewer(1); - -// TODO: create new vwindow or change current vwindow - if( mwindow->session->drag_assets->total ) - vwindow->change_source( - mwindow->session->drag_assets->values[0]); - else - if( mwindow->session->drag_clips->total ) - vwindow->change_source( - mwindow->session->drag_clips->values[0]); - + for( int i=0; isession->drag_assets->size(); ++i ) { + VWindow *vwindow = mwindow->get_viewer(1); + vwindow->gui->lock_window("AssetPopupView::handle_event 1"); + vwindow->change_source(mwindow->session->drag_assets->get(i)); + vwindow->gui->unlock_window(); + } + for( int i=0; isession->drag_clips->size(); ++i ) { + VWindow *vwindow = mwindow->get_viewer(1); + vwindow->gui->lock_window("AssetPopupView::handle_event 2"); + vwindow->change_source(mwindow->session->drag_clips->get(i)); + vwindow->gui->unlock_window(); + } return 1; } diff --git a/cinelerra-5.1/cinelerra/clippopup.C b/cinelerra-5.1/cinelerra/clippopup.C index dd738963..677b9bed 100644 --- a/cinelerra-5.1/cinelerra/clippopup.C +++ b/cinelerra-5.1/cinelerra/clippopup.C @@ -219,21 +219,18 @@ ClipPopupViewWindow::~ClipPopupViewWindow() int ClipPopupViewWindow::handle_event() { -// Find window with nothing - VWindow *vwindow = mwindow->get_viewer(1); - -// TODO: create new vwindow or change current vwindow - vwindow->gui->lock_window("ClipPopupView::handle_event"); - - if( mwindow->session->drag_assets->total ) - vwindow->change_source( - mwindow->session->drag_assets->values[0]); - else - if( mwindow->session->drag_clips->total ) - vwindow->change_source( - mwindow->session->drag_clips->values[0]); - - vwindow->gui->unlock_window(); + for( int i=0; isession->drag_assets->size(); ++i ) { + VWindow *vwindow = mwindow->get_viewer(1); + vwindow->gui->lock_window("ClipPopupView::handle_event 1"); + vwindow->change_source(mwindow->session->drag_assets->get(i)); + vwindow->gui->unlock_window(); + } + for( int i=0; isession->drag_clips->size(); ++i ) { + VWindow *vwindow = mwindow->get_viewer(1); + vwindow->gui->lock_window("ClipPopupView::handle_event 2"); + vwindow->change_source(mwindow->session->drag_clips->get(i)); + vwindow->gui->unlock_window(); + } return 1; }