DiveLocationManagement rewrite

Dirk Hohndel dirk at hohndel.org
Tue Sep 22 18:55:06 PDT 2015


On Tue, Sep 22, 2015 at 05:50:45PM -0300, Tomaz Canabrava wrote:
> Uffs, so:
> 
> This patch series completely rewrites the LocationManagement *lineedit +
> combobox* that we used to have.

Wow.

> It is stetically identical to the old one, everything beneath the UI has
> changed.

There are a few minute differences... one that I noticed is that if you
have focus in the location field (let's say you clicked on it), simply
pressing shift or control already gets the completer shown - before you
ever entered (or removed) a character. That's not terrible, but it seemed
noteworthy

> it currently *doesn't* works ( the line edit + selection *works* , but it
> doesn't *sets* the dive site ) - I need a bit of help on that as my time
> just runned out.

That makes it a bit harder to test. So I focused on testing simply what's
shown to the user and how you can navigate with mouse and keyboard.

If I hit enter on a selection it's chosen. But clicking on a selection
only highlights it but it doesn't get chosen.

> but basically:
> after a dive site is choosed on the new location line edit, you have:
> currentDiveSiteUuid and text()
> if location.currentDiveSiteUuid() == 1, this means that we need to create a
> new dive site and set the text() as dive_site.name
> 
> if location.currentDiveSiteUuid() > 1, it's an existing dive site. just set
> it on the dive.
> 
> Please test: I'm doing this in berseker mode for two days trying to remove
> the old system that's completely broken ( because we where abusing
> QCompleter, it works very well in all other cases that we use it. )

As I said in IRC - I'm quite nervous about such a dramatic rewrite this
late in the cycle. I understand why we need it as this addresses a user
visible bug in the current code... still. Urgs.

Since right now it stops us from actually selecting dive sites I didn't
pull this into master, yet.

Thanks for your hard work, Tomaz.

/D


More information about the subsurface mailing list