delete gui; gui = 0;
delete mainindexes; mainindexes = 0;
delete mainprogress; mainprogress = 0;
- delete audio_cache; audio_cache = 0; // delete the cache after the assets
- delete video_cache; video_cache = 0; // delete the cache after the assets
+ // delete the caches after the assets
+ if( audio_cache ) { audio_cache->remove_user(); audio_cache = 0; }
+ if( video_cache ) { video_cache->remove_user(); video_cache = 0; }
delete frame_cache; frame_cache = 0;
delete wave_cache; wave_cache = 0;
delete plugin_guis; plugin_guis = 0;
if( load_mode == LOADMODE_REPLACE ||
load_mode == LOADMODE_REPLACE_CONCATENATE ) {
+ edl->session->timecode_offset = 0;
delete gui->keyvalue_popup;
gui->keyvalue_popup = 0;
gui->load_panes();
for( int i=stack.size(); --i>=0; ) {
StackItem &item = stack[i];
Indexable *idxbl = item.idxbl;
+ if( !idxbl ) continue;
if( idxbl->is_asset ) {
Asset *asset = (Asset *)idxbl;
if( asset->format == FILE_REF ) {
return 1;
}
}
- else if( item.new_edl != item.idxbl )
- item.new_edl->overwrite_clip((EDL*)item.idxbl);
+ else if( item.new_edl != idxbl )
+ item.new_edl->overwrite_clip((EDL*)idxbl);
}
EDL *new_edl = stack.size() ? stack[0].edl : edl;
save(new_edl, path, 1);
void MWindow::reset_caches()
{
- awindow->gui->stop_vicon_drawing();
+ int locked = gui->get_window_lock();
+ if( locked ) gui->unlock_window();
+ awindow->gui->stop_vicon_drawing(1);
frame_cache->remove_all();
wave_cache->remove_all();
audio_cache->remove_all();
if( vwindow->playback_engine->video_cache )
vwindow->playback_engine->video_cache->remove_all();
}
+ if( locked ) gui->lock_window("MWindow::reset_caches");
}
void MWindow::remove_from_caches(Indexable *idxbl)
{
- awindow->gui->stop_vicon_drawing();
+ awindow->gui->stop_vicon_drawing(1);
frame_cache->remove_item(idxbl);
wave_cache->remove_item(idxbl);
if( gui->render_engine &&
void MWindow::remove_assets_from_project(int push_undo, int redraw, int delete_indexes,
ArrayList<Indexable*> *drag_assets, ArrayList<EDL*> *drag_clips)
{
- awindow->gui->stop_vicon_drawing();
+ awindow->gui->stop_vicon_drawing(1);
// Remove from VWindow.
if( drag_clips ) {
void MWindow::next_time_format()
{
- switch(edl->session->time_format)
- {
- case TIME_HMS: edl->session->time_format = TIME_HMSF; break;
- case TIME_HMSF: edl->session->time_format = TIME_SAMPLES; break;
- case TIME_SAMPLES: edl->session->time_format = TIME_SAMPLES_HEX; break;
- case TIME_SAMPLES_HEX: edl->session->time_format = TIME_FRAMES; break;
- case TIME_FRAMES: edl->session->time_format = TIME_FEET_FRAMES; break;
- case TIME_FEET_FRAMES: edl->session->time_format = TIME_SECONDS; break;
- case TIME_SECONDS: edl->session->time_format = TIME_HMS; break;
+ switch( edl->session->time_format ) {
+ case TIME_HMS: edl->session->time_format = TIME_HMSF; break;
+ case TIME_HMSF: edl->session->time_format = TIME_TIMECODE; break;
+ case TIME_TIMECODE: edl->session->time_format = TIME_FRAMES; break;
+ case TIME_FRAMES: edl->session->time_format = TIME_SAMPLES; break;
+ case TIME_SAMPLES: edl->session->time_format = TIME_SAMPLES_HEX; break;
+ case TIME_SAMPLES_HEX: edl->session->time_format = TIME_SECONDS; break;
+ case TIME_SECONDS: edl->session->time_format = TIME_FEET_FRAMES; break;
+ case TIME_FEET_FRAMES: edl->session->time_format = TIME_HMS; break;
}
-
time_format_common();
}
void MWindow::prev_time_format()
{
- switch(edl->session->time_format)
- {
- case TIME_HMS: edl->session->time_format = TIME_SECONDS; break;
- case TIME_SECONDS: edl->session->time_format = TIME_FEET_FRAMES; break;
- case TIME_FEET_FRAMES: edl->session->time_format = TIME_FRAMES; break;
- case TIME_FRAMES: edl->session->time_format = TIME_SAMPLES_HEX; break;
- case TIME_SAMPLES_HEX: edl->session->time_format = TIME_SAMPLES; break;
- case TIME_SAMPLES: edl->session->time_format = TIME_HMSF; break;
- case TIME_HMSF: edl->session->time_format = TIME_HMS; break;
+ switch( edl->session->time_format ) {
+ case TIME_HMS: edl->session->time_format = TIME_FEET_FRAMES; break;
+ case TIME_HMSF: edl->session->time_format = TIME_HMS; break;
+ case TIME_TIMECODE: edl->session->time_format = TIME_HMSF; break;
+ case TIME_FRAMES: edl->session->time_format = TIME_TIMECODE; break;
+ case TIME_SAMPLES: edl->session->time_format = TIME_FRAMES; break;
+ case TIME_SAMPLES_HEX: edl->session->time_format = TIME_SAMPLES; break;
+ case TIME_SECONDS: edl->session->time_format = TIME_SAMPLES_HEX; break;
+ case TIME_FEET_FRAMES: edl->session->time_format = TIME_SECONDS; break;
}
time_format_common();