vlsp.data.sl = list;
vlsp.vp = layer_and_vp[1];
vlsp.is_file_operation = TRUE;
+ vlsp.dirpath = (const gchar*)layer_and_vp[2];
vik_layer_set_param ( VIK_LAYER(layer_and_vp[0]), &vlsp );
}
vlsp.data = x;
vlsp.vp = vp;
vlsp.is_file_operation = TRUE;
+ vlsp.dirpath = dirpath;
vik_layer_set_param ( VIK_LAYER(stack->data), &vlsp );
}
found_match = TRUE;
VikLayerParamData data;
gpointer vp; // AKA VikViewport*
gboolean is_file_operation; // denotes if for file I/O, as opposed to display/cut/copy etc... operations
+ const gchar* dirpath; // The directory - so if the data is a relative file path, we know what it is relative to
} VikLayerSetParam;
typedef enum {
{
// Clear out old settings - if any commonalities with new settings they will have to be read again
a_dems_list_free ( vdl->files );
+
// Set file list so any other intermediate screen drawing updates will show currently loaded DEMs by the working thread
- vdl->files = vlsp->data.sl;
+ // Ensure resolving of any relative path names
+ util_make_absolute_filenames ( vdl->files, vlsp->dirpath );
+
// No need for thread if no files
if ( vdl->files ) {
// Thread Load
dem_load_thread_data *dltd = g_malloc ( sizeof(dem_load_thread_data) );
dltd->vdl = vdl;
- dltd->vdl->files = vlsp->data.sl;
a_background_thread ( BACKGROUND_POOL_LOCAL,
VIK_GTK_WINDOW_FROM_WIDGET(vlsp->vp),
VikLayerSetParam vlsp;
vlsp.vp = vvp;
vlsp.is_file_operation = FALSE;
+ vlsp.dirpath = NULL;
guint16 i, params_count = vik_layer_get_interface(vl->type)->params_count;
for ( i = 0; i < params_count; i++ )
{