<div dir="ltr"><div>This is the code that does (1)<br></div>please check if I got it right.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 13, 2015 at 4:24 PM, Tomaz Canabrava <span dir="ltr"><<a href="mailto:tcanabrava@kde.org" target="_blank">tcanabrava@kde.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Mon, Jul 13, 2015 at 4:14 PM, Linus Torvalds <span dir="ltr"><<a href="mailto:torvalds@linux-foundation.org" target="_blank">torvalds@linux-foundation.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Mon, Jul 13, 2015 at 12:00 PM, Tomaz Canabrava <<a href="mailto:tcanabrava@kde.org" target="_blank">tcanabrava@kde.org</a>> wrote:<br>
><br>
> Just to be sure:<br>
> If I have a dive with divesite "Yellow House" with gps coords<br>
> then I write on it's dive site the name "Leeds", it should reject because I<br>
> have gps coords?<br>
<br>
</span>So what I _think_ should happen is that you just create a new<br>
dive-site. You have a completely new dive site with a new name, and<br>
whatever GPS it had from before. Of course, if that "new name and GPS"<br>
then happens to match another dive site, at that point the two<br>
matching ones would be the same.<br>
<br>
But I think this depends on the interface. I think there are two very<br>
different models at play, and both are valid:<br>
<br>
 (a) when you are editing a dive (or multiple dives) I really think<br>
that you need to automatically (and silently) just create new<br>
divesites when somebody edits things (and this would be true whether<br>
the name changed or the GPS location changed, or both changed).<br>
<br>
     So this would be the "quick-edit" thing as part of the dive location.<br></blockquote><div><br></div></span><div>I'll focus on this part since it's what I'm doing now - there's no Dive Site Management Mode yet.<br></div><div><br>Imagine that you have a dive with <a href="http://dive_site.name" target="_blank">dive_site.name</a> = "Blue Hole" with coords, but it was a mistake and you wanna change to "Turtle Reef"<br><br>If the user types the name of a dive site, let's say "Turtle Reef", it should list on the dropdown<br></div><div>the list of all Turtle Reefs that it currently has ( plus the taxonomy or the gps coords if taxonomy is not found )<br></div><div>( now I also think I should add the coords even if the taxonomy is found because we can have two 'blue holes' in<br></div><div>the same country / place and such )<br><br></div><div>If the user clicks on a particular Turtle Reef from the drop down, it will select *that* dive_site to be the dive's dive site, replacing coords.<br><br></div><div>If the user clicks in nothing ( but changed the name of the dive site to Turtle Reef), <br>the user will have yet another Turtle Reef dive site created for him with no GPS coords.<br><br></div><div>now here I can: <br></div><div>1 - copy the coords from the old dive site <br></div><div>2 - leave without no gps coords and ask him to enter it again.<br></div><div>3 - Change the name of the the dive_site to be 'turtle reef'<br></div><div>4 - Select the first Turtle Reef from the dive_table ans set it ( this is what my last patch does )<br><br></div><div>I'll create the code for 1.<br></div><div></div><div> <br></div><div>And - I wanna make something that will make you happy and not hatred, so that's why I'm asking a lot of questions here.<br><br><br></div><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
(b) there's a separate issue of some "dive site management mode" which<br>
is independent of the actual dives.<br>
<br>
     So this would be some totally different mode, where you are *not*<br>
editing a dive, but you are doing things like "oh, let's clean up the<br>
name of that divesite that I've been to many times", or "Ugh, I have<br>
ten copies of this dive site, and they differ in minimal ways in<br>
spelling or are 10m apart in the GPS location, I want to merge these<br>
into one single dive site".<br>
<br>
I think (a) and (b) are completely different things, and have to work<br>
very differently. When I'm editing a dive and filling in the<br>
information for that dive, doing "dive site management" is absolutely<br>
the *last* thing the interface should do for me. It's why I absolutely<br>
*hated* how subsurface worked when you typed and auto-completed a<br>
dive-site name: it ended up then throwing out the GPS location you<br>
already had, and replacing it with some old dive site data. Which is<br>
really seriously buggered, especially since dive sites with the same<br>
name really are not unusual at all ("blue hole" being the classic<br>
example, but one I know well is "turtle reef", which is something<br>
Lahaina divers uses as a generic name encompassing many different dive<br>
sites, and if you didn't write up the actual specific name, you really<br>
can have "Turtle reef" with GPS locations ten _miles_ apart, rather<br>
than ten _meters_.<br>
<br>
And when you have two dives that are ten miles apart, the fact that<br>
they happen to share a name absolutely does *not* mean that they are<br>
the same divesite. It just means that maybe later you might want to<br>
specify the name better. Or maybe you'll never get around to it.<br>
<span><font color="#888888"><br>
                   Linus<br>
</font></span></blockquote></div></div></div><br></div></div>
</blockquote></div><br></div>