]> git.street.me.uk Git - andy/viking.git/blobdiff - src/vikdemlayer.c
Threading rewrite to remove use of unsupported cross platform threading update of...
[andy/viking.git] / src / vikdemlayer.c
index 7df1a57ad735c6bfe45293cf59cca4c6bf7e1f53..12d52145c8490b7aa82c551477ed0631fbd4bceb 100644 (file)
@@ -345,11 +345,9 @@ static int dem_layer_load_list_thread ( dem_load_thread_data *dltd, gpointer thr
 
   // ATM as each file is processed the screen is not updated (no mechanism exposed to a_dems_load_list)
   // Thus force draw only at the end, as loading is complete/aborted
-  //gdk_threads_enter();
   // Test is helpful to prevent Gtk-CRITICAL warnings if the program is exitted whilst loading
   if ( IS_VIK_LAYER(dltd->vdl) )
-    vik_layer_emit_update ( VIK_LAYER(dltd->vdl) ); // NB update from background thread
-  //gdk_threads_leave();
+    vik_layer_emit_update ( VIK_LAYER(dltd->vdl) ); // NB update requested from background thread
 
   return result;
 }
@@ -1181,16 +1179,14 @@ static void dem_download_thread ( DEMDownloadParams *p, gpointer threaddata )
   else
     return;
 
-  //gdk_threads_enter();
   g_mutex_lock ( p->mutex );
   if ( p->vdl ) {
     g_object_weak_unref ( G_OBJECT(p->vdl), weak_ref_cb, p );
 
     if ( dem_layer_add_file ( p->vdl, p->dest ) )
-      vik_layer_emit_update ( VIK_LAYER(p->vdl) ); // NB update from background thread
+      vik_layer_emit_update ( VIK_LAYER(p->vdl) ); // NB update requested from background thread
   }
   g_mutex_unlock ( p->mutex );
-  //gdk_threads_leave();
 }