crikey rework, KP4 fix, added Shift-KPx, valgrind cleanups, hex eye-dropper, resize...
[goodguy/history.git] / cinelerra-5.1 / cinelerra / mwindowedit.C
index b09300849d0eb1a4ad55eeec60d11df569ee4b53..9e53bde729a8d62cf0fd56f3e5bf7409c8512541 100644 (file)
@@ -1153,15 +1153,11 @@ int MWindow::paste_assets(double position, Track *dest_track, int overwrite)
 }
 
 void MWindow::load_assets(ArrayList<Indexable*> *new_assets,
-       double position,
-       int load_mode,
-       Track *first_track,
-       RecordLabels *labels,
-       int edit_labels,
-       int edit_plugins,
-       int edit_autos,
-       int overwrite)
+       double position, int load_mode, Track *first_track, RecordLabels *labels,
+       int edit_labels, int edit_plugins, int edit_autos, int overwrite)
 {
+       if( load_mode == LOADMODE_RESOURCESONLY )
+               load_mode = LOADMODE_ASSETSONLY;
 const int debug = 0;
 if( debug ) printf("MWindow::load_assets %d\n", __LINE__);
        if( position < 0 ) position = edl->local_session->get_selectionstart();
@@ -1444,7 +1440,8 @@ int MWindow::paste_edls(ArrayList<EDL*> *new_edls, int load_mode,
                }
 //PRINT_TRACE
 // Insert edl
-               if( load_mode != LOADMODE_RESOURCESONLY ) {
+               if( load_mode != LOADMODE_RESOURCESONLY &&
+                   load_mode != LOADMODE_ASSETSONLY ) {
 // Insert labels
 //printf("MWindow::paste_edls %f %f\n", current_position, edl_length);
                        if( load_mode == LOADMODE_PASTE ||
@@ -2026,9 +2023,11 @@ void MWindow::save_clip(EDL *new_edl, const char *txt)
        cp[n] = 0;
 
        edl->update_assets(new_edl);
+       int cur_x, cur_y;
+       gui->get_abs_cursor_xy(cur_x, cur_y, 0);
        gui->unlock_window();
 
-       awindow->clip_edit->create_clip(new_edl);
+       awindow->clip_edit->create_clip(new_edl, cur_x, cur_y);
 
        gui->lock_window("MWindow::save_clip");
        save_backup();