--- trunk/src/misc.c 2009/12/02 20:05:52 226 +++ trunk/src/misc.c 2009/12/03 20:07:13 228 @@ -1178,9 +1178,12 @@ if(!id) pos_set(item, cache->pos.lat, cache->pos.lon); - else if(id == 1) - pos_set(item, cache->notes->pos.lat, cache->notes->pos.lon); - else { + else if(id == 1) { + /* fetch position out of notes dialog since they probably */ + /* haven't been saved yet */ + pos_t pos = notes_get_pos(appdata->cache_context); + pos_set(item, pos.lat, pos.lon); + } else { wpt_t *wpt = cache->wpt; while(wpt && id > 2) { wpt = wpt->next; @@ -1261,7 +1264,7 @@ name, cb_cache, 0, lon_entry, lat_entry); /* overwritten cache position */ - if(cache->notes && pos_valid(&cache->notes->pos)) + if(appdata->cache_context && notes_get_override(appdata->cache_context)) menu_add(menu, appdata, icon_get_widget(ICON_POS, cache->type + 6), _("Modified coordinate"), cb_cache, 1, lon_entry, lat_entry); @@ -1444,7 +1447,7 @@ name, cb_cache, 0); /* overwritten cache position */ - if(cache->notes && pos_valid(&cache->notes->pos)) + if(appdata->cache_context && notes_get_override(appdata->cache_context)) preset_picker_add(store, appdata, icon_get(ICON_POS, cache->type + 6), _("Modified coordinate"), cb_cache, 1);