richsmith / sexytopo

The SexyTopo cave surveying app for Android
GNU General Public License v3.0
30 stars 13 forks source link

Station comment cannot be added to first station of survey #166

Open CaverBruce opened 2 years ago

CaverBruce commented 2 years ago

I notice that in plan and elevation sketch views I can leave a station comment via the long tap context menu. If I try to do so for the first station of a survey, the comment option is greyed out.
Is this by design or is it a bug?
It seems to me that the stations most likely to have comments associated with them are the first and last stations of a branch or survey. As an aside, it would be nice to use the long tap context menu in the table view to add comments as well (the same comment object that is visible in the sketch views). Despite the stated intention that most functions should be accessible via the sketch view (and it is a good aim) I do find I spend a lot of time in the table view, if only to make sense of incoming data and verify what is going on. For this reason it would be nice to be able to create and access comments from all display modes. ST v1.6.0

richsmith commented 2 years ago

This is by design (kind of). In most survey file formats there isn't really a concept of a station - just legs. The origin station doesn't have a leg that formed it, so where would the comment go? There might be a better way to handle it, but I initially just disabled the option of setting a comment for the first station to avoid this problem.

CaverBruce commented 2 years ago

Semantics perhaps. Are stations objects or only properties of legs? I certainly think of them as both, depending on ones focus of the moment. My impression as a user of Therion for example, is that stations appear to be coded as objects with their own properties, but maybe that is an illusion. Stations and their properties (id, position, mark, flags and possibly others) can be exported, which suggests to me they are objects. Same with four other survey applications, that I have not used for years, but recall similarly. Not that I know anything at all about json format or how ST is coded, but looking at the data.json files ST produces, it looks to me like stations are objects with properties of name, eedirection, comment and legs. Screenshot of the first station and shots in a random file. The first station has a comment property written, although it is of course empty. So I don't see what the problem is with allowing comments on the initial station. Perhaps the 'first-station' comment is less easily flagged in the data table, but I don't see that as a reason to disallow them.

Also I vaguely recall that station comments are not exported to Therion formats (but I might be wrong - very occasional user sorry). If this is the case then they should be added to the survey *.th file.

image image