purge file_cache when starting rev read cache burst
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / awindowgui.C
index d71d1588715e1e58e4d0f69028d38c5ba95e3edc..c9a9a898ec33ba473d1690df138d127f541a7a24 100644 (file)
@@ -612,22 +612,10 @@ AssetVIconThread::AssetVIconThread(AWindowGUI *gui, Preferences *preferences)
        case VICON_COLOR_MODE_HIGH:  vicon_cmodel = BC_RGB888;  break;
        }
        this->vicon_cmodel = vicon_cmodel;
-       this->draw_lock = new Mutex("AssetVIconThread::draw_lock");
 }
 
 AssetVIconThread::~AssetVIconThread()
 {
-       delete draw_lock;
-}
-
-void AssetVIconThread::drawing_started()
-{
-       draw_lock->lock("AssetVIconThread::drawing_started");
-}
-
-void AssetVIconThread::drawing_stopped()
-{
-       draw_lock->unlock();
 }
 
 void AssetVIconThread::set_view_popup(AssetVIcon *v, int draw_mode)
@@ -691,10 +679,8 @@ ViewPopup *AssetVIconThread::new_view_window(ViewPopup *vpopup)
 void AssetVIconThread::stop_vicon_drawing(int wait)
 {
        stop_drawing();
-       if( wait ) {
-               drawing_started(); // waits for draw lock
-               drawing_stopped();
-       }
+       gui->lock_window("AssetVIconThread::stop_vicon_drawing");
+       gui->unlock_window();
 }
 
 
@@ -959,6 +945,11 @@ void AssetPicon::create_objects()
                if( asset->video_data ) {
                        if( mwindow->preferences->use_thumbnails ) {
                                gui->unlock_window();
+                               char string[BCTEXTLEN];
+                               sprintf(string, _("Reading %s"), name);
+                               mwindow->gui->lock_window("AssetPicon::create_objects");
+                               mwindow->gui->show_message(string);
+                               mwindow->gui->unlock_window();
                                File *file = mwindow->video_cache->check_out(asset,
                                        mwindow->edl,
                                        1);
@@ -982,11 +973,6 @@ void AssetPicon::create_objects()
                                                        asset->width, asset->height,
                                                        BC_RGB888, -1);
                                        }
-                                       { char string[BCTEXTLEN];
-                                       sprintf(string, _("Reading %s"), name);
-                                       mwindow->gui->lock_window("AssetPicon::create_objects");
-                                       mwindow->gui->show_message(string);
-                                       mwindow->gui->unlock_window(); }
                                        file->read_frame(gui->temp_picon);
                                        mwindow->video_cache->check_in(asset);