open asset/clip viewers en masse
authorGood Guy <[email protected]>
Sat, 10 Mar 2018 16:46:46 +0000 (09:46 -0700)
committerGood Guy <[email protected]>
Sat, 10 Mar 2018 16:46:46 +0000 (09:46 -0700)
cinelerra-5.1/cinelerra/assetpopup.C
cinelerra-5.1/cinelerra/clippopup.C

index b7aafa0dcec2445849db0afe14a6e9ced3162eb0..07cc8eb4dd1ded8c0f336bd1616bce654247bd32 100644 (file)
@@ -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; i<mwindow->session->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; i<mwindow->session->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;
 }
 
index dd73896330963ebdd431aaf67b58155b3a704fd0..677b9bedf4ff4a6cb17b859492f2ba6b03d7ea30 100644 (file)
@@ -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; i<mwindow->session->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; i<mwindow->session->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;
 }