dive merge

Lubomir I. Ivanov neolit123 at gmail.com
Tue Sep 24 00:50:28 UTC 2013


this seems to work:
selectionModel()->selectedRows().count() > 1

but both methods are not optimal when a trip with a single dive is
selected, because the index count is > 14 and the row count is > 1.
so perhaps there has to be also a check if the row count is 2 and the
first row is a trip, or when the selection does not include a trip
row.

lubomir
--

On 24 September 2013 08:02, Dirk Hohndel <dirk at hohndel.org> wrote:
>
> I randomly played around with Subsurface to find little things to add
> (I'm sure you are all doing this in your spare time, right?) - and
> stumbled across dive merging.
>
> I pushed my implementation but I want someone who actually speaks Qt to
> look at the odd way in which I ended up determining if more than 1 dive
> is selected.
>
> if (selectionModel()->selection().indexes().count() > 14)
>
> Turns out that selection.indexes() counts all fields and we happen to
> have 14 columns... that seems REALLY hackish to me.
>
> Tomaz? Thiago? mgue?
>
> What's the elegant way to do this?
>
> /D
>
> _______________________________________________
> subsurface mailing list
> subsurface at hohndel.org
> http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-divelistview-use-selectedRows-to-check-for-multi-row.patch
Type: application/octet-stream
Size: 1001 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130924/b35f94cd/attachment-0001.obj>


More information about the subsurface mailing list