Marek
There are now selected geocache and selected waypoint in GuiState when
waypoint is selected. That's way by default the parent cache is used
wherever it has not been explicitly corrected to handle waypoints.
I'll try and take a look at the edit for starters if I have time.
Ville
Turns out, it's not that straight forward to implement waypoint support
for said menu actions. Since CacheActions act method takes a Geocache as
an argument we'd need to change it to take in GeoObject to support
waypoints. But most CacheActions are purely for geocaches and not for
Waypoints. That doesn't feel good, but I guess is needed to in order to
support waypoints for some CacheActions.
Anyone have any better ideas?
Ville
p.s. I guess radar-will also show parent cache even if waypoint is selected.
> Anyone have any better ideas?
Here is an initial patch for the waypoint projections, although I have not yet thoroughly tested it.
If it works, it may be feasible to use the same approach in the other areas.
Apparently in some cases, the parent of a waypoint was Null. I simply added a check for this.
Cheers.
public interface CacheAction {
public void act(Geocache geocache);
}
public interface CacheAction {
public void act(Geocache geocache, Waypoint waypoint);
}
1. The projection description will get the description of the waypoint, not the original cache, if it is a waypoint which is being projected.
2. After projecting a waypoint, the compass is set to the projected waypoint. (Diff for MainActivity.java)
This will save time in most cases, because the user normally wants to immediately navigate to the projection (although not always).
It has the disadvantage though of being perhaps surprising behaviour for the user. Someday I may add a user choice for this.
In the meantime, feel free to ignore item #2, if you are uncomfortable with committing it.
Cheers.
On Aug 25, 2010, at 21:58, Anders Petersson wrote:
> I've fixed Navigate, RMaps and radar.
Did you commit this? Currently when I choose a waypoint, and then choose the radar, I still seem to get the coordinates of the main cache.
Cheers.
> Yes I committed it but apparently some more changes were needed. Try now. :)
Thanks, that works much better. :-)
By the way, I'm working on two things right now:
1. Direct selection of waypoints from the compass tab. (Almost finished)
2. In the details tab, a warning dialog before a waypoint is deleted. (While testing, I accidentally delete a waypoint which I meant to select.)
Cheers.
The patch adds a "quick and dirty" alert dialog to confirm the delete operation. As such, you may not necessarily like the style of the change. I'm open to suggestions.
Cheers