Re: Liquid Vision dive log/Lynx support?

2014-11-05 Thread Henrik Brautaset Aronsen
On Wed, Nov 5, 2014 at 8:58 AM, Henrik Brautaset Aronsen 
subsurf...@henrik.synth.no wrote:

 On Wed, Nov 5, 2014 at 7:07 AM, Griffon Walker bushi...@gmail.com wrote:

 Is Liquid Vision dive log support or even better, Liquid Vision Lynx
 direct download support anywhere on the radar? Happy to supply logs or
 whatnot if it will help.


 Liquivision import is something we don't have yet.  There's an issue in
 trac that covers the LVD file import:
 http://trac.subsurface-divelog.org/ticket/685

 Also, I believe Dirk is talking to the Divinglog author (Sven) about
 getting some help with the import.


Griffon, if you can share a LVD file, please attach to the issue in trac,
or send it here, or send it to me.  If there is any other info you can add,
e.g. screenshot of profiles, or an additional export of the dives (UDDF,
XML, CSV, I don't know what the Liquivision software is capable of), that
would be perfect as well.

If there are any developers out there who want to implement the LVD import
in Subsurface, we have an example implementation that can be used as
reference.  Just contact me or Dirk.

Cheers,
Henrik
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Poseidon CCR dives: Nitrogen loading

2014-11-05 Thread Miika Turkia
On Wed, Nov 5, 2014 at 3:44 PM, Willem Ferguson 
willemfergu...@zoology.up.ac.za wrote:

  On 05/11/2014 09:11, Miika Turkia wrote:

  On Wed, Nov 5, 2014 at 3:02 PM, Willem Ferguson 
 willemfergu...@zoology.up.ac.za wrote:

 Robert,
 Would you be prepared to look at the sample dive log in the dives
 directory? There are two versions of the same dive, one in CSV, another in
 XML. When importing the CSV version, NO nitrogen loading is shown, however
 when loading the XML version, nitrogen loading is indeed shown. Are you in
 a position at all to say what causes this?


  Isn't nitrogen loading toggled with the N2 button? If so, I do see the
 nitrogen loading when importing the CSV (of course, I need to actually
 select the .txt file for import, to get the Poseidon parsing triggered).

  miika

 The N2 button toggles display of the nitrogen partial pressure. But it
 does not toggle the display of the ceiling and tissue compartment loading
 (this is controlled by another button on the dive profile panel, the one
 with the diver and the up-arrow). If the gradient factors are shown above
 the profile, then it means that display of the calculation of nitrogen
 loading at the tissue compartment level is switched on. On my machine, the
 NDL remains at the maximum level (120 min) throughout the dive, no ceiling
 appears and Robert's tissue loading display (at the bottom of the panel and
 in the information box) shows NO tissue loading at all. Yet, the XML dive
 log shows strong tissue loading and looks much more realistic to me. I
 suspect it is just a variable that needs to be set somewhere, but I am
 clueless.


Of course.. I have that always enabled on my normal computer, so I had no
idea it was turned off on this one.

Anyway, when I load the Poseidon XML, save it and load the new file, I get
different nitrogen loading. Some information is clearly lost on this
scenario, and at least the setpoint value seems to be missing from the new
file when saved from Subsurface. The O2 graph seems to be quite different
on different import / load files.

miika
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


CCR CSV input inconsistency

2014-11-05 Thread Willem Ferguson

Miika,

The inconsistency I found after locally implementing your patch of 
moving the declaration of cur_cylinder_index from outside to inside the 
function parse_txt_file() was that the starting cylinder pressure of the 
diluent cylinder is lost starting at the second of a series of 
consecutive imports (i.e. the first import is ok but the ones afterwards 
not). This may be suggestive that the value of diluent_pressure is not 
re-initialised before the loop that parses the CSV text.

1) If I insert the following:
cylinder_pressure = 0;
diluent_pressure = 0;
just before the for (;;) {, then the problem is solved. All diluent 
cylinder values are initialised correctly.


2) Now these two variables are initalised every time the function runs, 
but they are static. If I take away the static attribute so that the 
declaration is just:

int diluent_pressure = 0, cylinder_pressure = 0;
Then the problem is also solved.

I have no idea whether these variables, because of their static 
attribute should have any meaning outside of the function and I am not 
sure whether it is safe to remove the static attribute.

Your opinion, please?
Kind regards,
\willem


___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Poseidon CCR dives: Nitrogen loading

2014-11-05 Thread Robert Helling
On 05.11.2014, at 08:02, Willem Ferguson willemfergu...@zoology.up.ac.za wrote:Willem,Would you be prepared to look at the sample dive log in the dives directory? There are two versions of the same dive, one in CSV, another in XML. When importing the CSV version, NO nitrogen loading is shown, however when loading the XML version, nitrogen loading is indeed shown. Are you in a position at all to say what causes this?Some debugging shows the ceiling calculation was thinking you were diving pure O2 though out the dive as that is what is contained in cylinder 0 which is the default starting cylinder. Here is a patch that makes the diluent cylinder the default starting cylinder instead.BestRobert

0001-Start-CCR-dives-using-diluent-if-in-doubt.patch
Description: Binary data

--.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oORobert C. Helling   Elite Master Course Theoretical and Mathematical Physics   Scientific Coordinator   Ludwig Maximilians Universitaet Muenchen, Dept. Physik   Phone: +49 89 2180-4523 Theresienstr. 39, rm. B339   http://www.atdotde.deEnhance your privacy, use cryptography! My PGP keys have fingerprintsA9D1 A01D 13A5 31FA 6515 BB44 0820 367C 36BC 0C1D  andDCED 37B6 251C 7861 270D 5613 95C7 9D32 9A8D 9B8F



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: CCR CSV input inconsistency

2014-11-05 Thread Miika Turkia
IIRC they should be fine without the static. New input file - start from zero 
again.

miika

 On 05 Nov 2014, at 19:30, Willem Ferguson willemfergu...@zoology.up.ac.za 
 wrote:
 
 Miika,
 
 The inconsistency I found after locally implementing your patch of moving the 
 declaration of cur_cylinder_index from outside to inside the function 
 parse_txt_file() was that the starting cylinder pressure of the diluent 
 cylinder is lost starting at the second of a series of consecutive imports 
 (i.e. the first import is ok but the ones afterwards not). This may be 
 suggestive that the value of diluent_pressure is not re-initialised before 
 the loop that parses the CSV text.
 1) If I insert the following:
 cylinder_pressure = 0;
 diluent_pressure = 0;
 just before the for (;;) {, then the problem is solved. All diluent cylinder 
 values are initialised correctly.
 
 2) Now these two variables are initalised every time the function runs, but 
 they are static. If I take away the static attribute so that the declaration 
 is just:
int diluent_pressure = 0, cylinder_pressure = 0;
 Then the problem is also solved.
 
 I have no idea whether these variables, because of their static attribute 
 should have any meaning outside of the function and I am not sure whether it 
 is safe to remove the static attribute.
 Your opinion, please?
 Kind regards,
 \willem
 
 
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Poseidon CCR dives: Nitrogen loading

2014-11-05 Thread Robert C. Helling

On 05 Nov 2014, at 17:37, Willem Ferguson willemfergu...@zoology.up.ac.za 
wrote:

Willem,

 1) This patch has an unintended consequence: The ending cylinder pressure for 
 the diluent cylinder (as seen on the equipment tab) is changed to reflect 
 that of the ending pressure of the oxygen cylinder. The diluent cylinder 
 index for the Poseidon diluent is the dreaded and infamous 1. We hardcode the 
 cylinder IDs here while reading in the dive log because it is very specific 
 to the Poseidon. In addition, even though these specific two cylinders have 
 already been assigned to enum values of oxygen and diluent respectively, we 
 are in the process of setting up the cylinders, so we cannot already use the 
 functions that use these enum values.
 So:  dive-cylinder[1].sample_end.mbar for this sample dive has a value of 
 141, that of the oxygen cylinder. The correct ending value for this variable 
 is 137. I have carefully looked around the code around line 600 in file.c but 
 cannot see the cause of this problem. Run the code with and without your 
 patch and see the difference.
 

This is weird. For some reason the pressures for the O2 cylinder are shown even 
when the gas name is “Air”. Have to investigate this further.

 2) A question just to improve my understanding of the code. If the 
 explicit_first_cylinder() result is diluent, does this mean that the deco 
 requirements are calculated for the gas in the diluent cylinder? In this case 
 the diluent is air, but the displayed ceilings do not (at first sight) appear 
 to be shallower than that for air dives to the quivalent depths. For 
 instance, if I simulate the sample dive as an air dive using the planner, the 
 dive extended to 70 min for sufficient deco. So if the ceilings reflect the 
 pn2 values at the various depths as actually calculated at each point on the 
 profile, why does it matter whether one starts with cylinder 0 or cylinder 1?


It means that air is handed to fill_pressures as gasmix (for which then the 
inert gas pressures are adopted according to the set point). So it should do 
the correct thing. If you gave it O2 then the gas output would always be pure 
O2 (and thus no deco obligation).

Best
Robert

--  
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO 
Robert C. Helling Elite Master Course Theoretical and Mathematical Physics  
  Scientific Coordinator   
  Ludwig Maximilians Universitaet Muenchen, Dept. Physik
print Just another   Phone: +49 89 2180-4523  Theresienstr. 39, rm. B339   
stupid .sig\n;   http://www.atdotde.de 



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Poseidon CCR dives: Nitrogen loading

2014-11-05 Thread Dirk Hohndel
On Wed, Nov 05, 2014 at 06:34:38PM +0100, Robert C. Helling wrote:
 
 On 05 Nov 2014, at 17:37, Willem Ferguson willemfergu...@zoology.up.ac.za 
 wrote:
 
 Willem,
 
  1) This patch has an unintended consequence: The ending cylinder pressure 
  for the diluent cylinder (as seen on the equipment tab) is changed to 
  reflect that of the ending pressure of the oxygen cylinder. The diluent 
  cylinder index for the Poseidon diluent is the dreaded and infamous 1. We 
  hardcode the cylinder IDs here while reading in the dive log because it is 
  very specific to the Poseidon. In addition, even though these specific two 
  cylinders have already been assigned to enum values of oxygen and diluent 
  respectively, we are in the process of setting up the cylinders, so we 
  cannot already use the functions that use these enum values.
  So:  dive-cylinder[1].sample_end.mbar for this sample dive has a value of 
  141, that of the oxygen cylinder. The correct ending value for this 
  variable is 137. I have carefully looked around the code around line 600 in 
  file.c but cannot see the cause of this problem. Run the code with and 
  without your patch and see the difference.
  
 
 This is weird. For some reason the pressures for the O2 cylinder are shown 
 even when the gas name is “Air”. Have to investigate this further.

The code that handles what's the current gas is rather dumb. I wouldn't
be surprised if there were assumptions somewhere that whatever gas you
have the sensor pressure for is also the gas that you are breathing.
That's the first place I would look.

  2) A question just to improve my understanding of the code. If the 
  explicit_first_cylinder() result is diluent, does this mean that the deco 
  requirements are calculated for the gas in the diluent cylinder? In this 
  case the diluent is air, but the displayed ceilings do not (at first sight) 
  appear to be shallower than that for air dives to the quivalent depths. For 
  instance, if I simulate the sample dive as an air dive using the planner, 
  the dive extended to 70 min for sufficient deco. So if the ceilings reflect 
  the pn2 values at the various depths as actually calculated at each point 
  on the profile, why does it matter whether one starts with cylinder 0 or 
  cylinder 1?
 
 
 It means that air is handed to fill_pressures as gasmix (for which then the 
 inert gas pressures are adopted according to the set point). So it should do 
 the correct thing. If you gave it O2 then the gas output would always be pure 
 O2 (and thus no deco obligation).

No deco obligation and one heck of a CNS/OTU value I'd guess :-)

/D
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH] Import Datatrak/WLog files

2014-11-05 Thread Salvador Cuñat
Hi Dirk.

May be you missed the previous  patch.

Attached is a new one that should apply on  git-d643bde.   Please see
comments in previous mail.
This patch includes a little improvement and fixes a bug detected thaks to
one of Pedro's logs.

Regards.

Salva

2014-11-03 11:20 GMT+01:00 Salvador Cuñat salvador.cu...@gmail.com:


 El 03/11/2014 09:02, Pedro Neves nevesdi...@gmail.com escribió:
 
  Hi Salva:
 
  Thanks for the logs. Nice work.
 
 Hi Pedro.
 Thanks for your feedback.
 Although I told you can use that logs,  it should be preferable to wait to
 the pushed version in next release,  as all the new tags should be
 translated.

 Regards.

 Salva.

From 342aa5c2114da9e23d5061ad93424b582208b7dc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Salvador=20Cu=C3=B1at?= salvador.cu...@gmail.com
Date: Wed, 5 Nov 2014 19:38:27 +0100
Subject: [PATCH] Import Datatrak/WLog files
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Sequentially parses a file, expected to be a Datatrak/WLog divelog, and
converts the dive info into Subsurface's dive structure.

As my first DC, back in 90s, was an Aladin Air X, the obvious choice of log
software was DTrak (Win version). After using it for some time we moved to WLog
(shareware software more user friendly than Dtrak, printing capable, and still
better, it runs under wine, which, as linux user, was definitive for me). Then,
some years later, my last Aladin died and I moved to an OSTC, forcing me to
look for a software that support this DC.
I found JDivelog which was capable of import Dtrak logs and used it for some
time until discovered Subsurface existence and devoted to it.

The fact was that importing Dtrak dives in JDivelog and then re-importing them
in Subsurface caused a significant data loss (mainly in the profile events and
alarms) and weird location of some other info in the dive notes (mostly tag
items in the original Dtrak software). This situation can't actually be solved
with tools like divelogs.de which causes similar if no greater data loss.

Although this won't be a core feature for Subsurface, I expect it can be useful
for some other divers as has been for me.

Comments an issues:

Datatrak/Wlog files include a lot of diving data which are not directly
supported in Subsurface, in these cases we choose mostly to use tags.

The lack of some important info in Datatrak archives (e.g. tank's initial
pressure) forces us to do some arbitrary assumptions (e.g. initial pressure =
200 bar).

There might be archives coming directly from old DOS days, as first versions
of Datatrak run on that OS; they were coded CP437 or CP850, while dive logs
coming from Win versions seems to be coded CP1252. Finally, Wlog seems to use a
mixed confusing style. Program directly converts some of the old encoded chars
to iso8859 but is expected there be some issues with non alphabetic chars, e.g.
ª.

There are two text fields: Other activities and Dive notes, both limited to
256 char size. We have merged them in Subsurface's Dive Notes although the
first one could be tagged, but we're unsure that the user had filled it in
a tag friendly way.

WLog adds some information to the dive and lets the user to write more than
256 chars notes. This is achieved, while keeping compatibility with DTrak
divelogs, by adding a complementary file named equally as the .log file and
with .add extension where all this info is stored.  We have, still, not worked
with this complementary files.

This work is based on the paper referenced in butracker #194 which has some
errors (e.g. beginning of log and beginning of dive are changed) and a lot of
bytes of unknown meaning. Example.log shows, at least, one more byte than those
referred in the paper for the O2 Aladin computer, this could be a byte referred
to the use of SCR but the lack of an OC dive with O2 computer makes impossible
for us to compare.

The only way we have figured out to distinguish a priori between SCR and non
SCR dives with O2 computers is that the dives are tagged with a rebreather
tag. Obviously this is not a very trusty way of doing things. In SCR dives,
the O2% in mix means, probably, the maximum O2% in the circuit, not the O2%
of the EAN mix in the tanks, which would be unknown in this case.

The list of DCs related in bug #194 paper seems incomplete, we have added
one or two from WLog and discarded those which are known to exist but whose
model is unknown, grouping them under the imaginative name of unknown. The
list can easily be increased in the future if we ever know the models
identifiers.
BTW, in Example.log, 0x00 identifier is used for some DC dives and from my own
divelogs is inferred that 0x00 is used for manually entered dives, this could
easily be an error in Example.log coming from a preproduction DC model.

Example.log which is shipped in datatrak package is included in dives
directory for testing pourposes.

Signed-off-by: Salvador Cuñat salvador.cu...@gmail.com
---
 datatrak.c  

Re: Poseidon CCR dives: Nitrogen loading

2014-11-05 Thread Robert C. Helling




 Am 05.11.2014 um 20:14 schrieb Willem Ferguson 
 willemfergu...@zoology.up.ac.za:
 
 By this I am not saying that the error is not there, but the problem is not 
 systemic. I am continuing to check there

My understanding is that at the moment we are not yet plotting two cylinder 
pressures (dil and O2) at the same time. It is just that the O2 gets plotted 
while you are expecting the dil to be plotted. Am I right?

Note that on the left, where the gas name should be, it reads (at least at my 
resolution) AIR100 which is likely the result of first printing EAN100 and then 
AIR on top of that. 

Right now I don't understand where in the code it is determined which cylinder 
pressure is plotted and gas name attached. 

Best 
Robert 
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Poseidon CCR dives: Nitrogen loading and Qt

2014-11-05 Thread Willem Ferguson

On 05/11/2014 21:26, Robert C. Helling wrote:
My understanding is that at the moment we are not yet plotting two 
cylinder pressures (dil and O2) at the same time. It is just that the 
O2 gets plotted while you are expecting the dil to be plotted. Am I 
right? Note that on the left, where the gas name should be, it reads 
(at least at my resolution) AIR100 which is likely the result of first 
printing EAN100 and then AIR on top of that. Right now I don't 
understand where in the code it is determined which cylinder pressure 
is plotted and gas name attached. 
Best Robert


You are correct. At the moment no UI development has taken place. There 
is only cylinder pressure data plotted for the oxygen cylinder. The 
diluent pressures still need to be added. So no CCR code for plotting 
exists and the UI shows the CCR stuff using the 'normal' OC display 
routines with no adaptation. What I assume is that the following may 
happen (and I have no clue as to where the code may lie that does this 
because that is Qt): The CSV import defines two cylinders, supplying 
full information with gas mix and cylinder pressure data. I suspect that 
both these cylinders are interpreted as in-use and their tags are 
plotted at the extreme left of the profile widget.


As far as oxygen is concerned, it is the po2 that is plotted as it 
always has been. Just, in the case of CCR, it is not computed using gas 
mix and depth, but based on the oxygen sensor data. This plot of po2 
needs no change. Only the sensor and setpoint data need to be added.


I do not think I have helped at all, but I have given you what I know.
Kind regards,
wilem
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Poseidon CCR dives: Nitrogen loading

2014-11-05 Thread Willem Ferguson

On 05/11/2014 21:26, Robert C. Helling wrote:
My understanding is that at the moment we are not yet plotting two 
cylinder pressures (dil and O2) at the same time. It is just that the 
O2 gets plotted while you are expecting the dil to be plotted. Am I 
right? Note that on the left, where the gas name should be, it reads 
(at least at my resolution) AIR100 which is likely the result of first 
printing EAN100 and then AIR on top of that. Right now I don't 
understand where in the code it is determined which cylinder pressure 
is plotted and gas name attached. 
Best Robert
While reviewing dive.c I came across at least one place where the 
dive-cylinder data members are copied individually. And since I have 
added two new members to cylinder, (the int variables 
oxygen_cylinder_index and diluent_cylinder_index), they are of course 
not copied. That code will need some careful consideration, although I 
do not think it is used now, only when cylinder data are moved or 
concatenated. Similarly, while reviewing gaspressures.c, I came across 
places where the new enum variables should be used, instead of the 
constants that I declared at that time. But since we are working with a 
standard system with o2 cyl has index 0 and dil cylinder has index 1, I 
cannot see that this could play a role in the present problem. But it 
needs attention and soon.

Kind regards,
willem
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Fwd: Re: Poseidon CCR dives: Nitrogen loading

2014-11-05 Thread Willem Ferguson



On 05/11/2014 21:26, Robert C. Helling wrote:

My understanding is that at the moment we are not yet plotting two
cylinder pressures (dil and O2) at the same time. It is just that the
O2 gets plotted while you are expecting the dil to be plotted. Am I
right? Note that on the left, where the gas name should be, it reads
(at least at my resolution) AIR100 which is likely the result of first
printing EAN100 and then AIR on top of that. Right now I don't
understand where in the code it is determined which cylinder pressure
is plotted and gas name attached.
Best Robert


 While reviewing dive.c I came across at least one place where the
dive-cylinder data members are copied individually. And since I have
added two new members to cylinder, (the int variables
oxygen_cylinder_index and diluent_cylinder_index), they are of course
not copied. That code will need some careful consideration, although I
do not think it is used now, only when cylinder data are moved or
concatenated. Similarly, while reviewing gaspressures.c, I came across
places where the new enum variables should be used, instead of the
constants that I declared at that time. But since we are working with a
standard system with o2 cyl has index 0 and dil cylinder has index 1, I
cannot see that this could play a role in the present problem. But it
needs attention and soon.
Kind regards,
willem



___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH] Convert volume calculations into floating point

2014-11-05 Thread Anton Lundin
The basic problem was that for gases containing more than 2147483648 ml
of nitrogen the calculations overflowed. This changes the code into
using floating point math for that calculation which will be more
accurate to.

Signed-off-by: Anton Lundin gla...@acc.umu.se
---
 statistics.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/statistics.c b/statistics.c
index 17667f8..f6c9202 100644
--- a/statistics.c
+++ b/statistics.c
@@ -342,8 +342,8 @@ static void get_gas_parts(struct gasmix mix, volume_t vol, 
int o2_in_topup, volu
return;
}
 
-   air.mliter = (vol.mliter * (1000 - get_he(mix) - get_o2(mix))) / 
(1000 - o2_in_topup);
-   he-mliter = (vol.mliter * get_he(mix)) / 1000;
+   air.mliter = (vol.mliter * (1000.0 - get_he(mix) - get_o2(mix))) / 
(1000.0 - o2_in_topup);
+   he-mliter = (vol.mliter * get_he(mix)) / 1000.0;
o2-mliter += vol.mliter - he-mliter - air.mliter;
 }
 
-- 
1.9.1

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Multi-Filter Search in action draft

2014-11-05 Thread Anton Lundin
On 03 November, 2014 - Dirk Hohndel wrote:

 On Mon, Nov 03, 2014 at 11:50:32PM +0100, Anton Lundin wrote:
  I haven't had a look at this feature before, but now when i played
  around with it i can't do anything but agree with Davide, Wow.
  
  Awesome work!
 
 Completely agree.
 
  A couple of feedback notes just:
  
  * When filtered on a tag, if you close the tag-filter-box you get no
feedback that you're still only showing filtered dives. Would be
nice with some notification like the edit-blurb or something with a
clear all filters box or something.
 
 If you look at Davide's design there's supposed to be a filter 'bar' that
 remains as long as the filter is active - and when you close that bar as
 well, the filter gets cleared.
 
 There are a few far more serious issues with the current version (and I'm
 working on fixing them): as the filter eliminates dives from what is
 visible, their selected state is not cleared. So if you select all
 dives, then filter down to fewer dives, in the statistics tab you can see
 that it still thinks all dives are selected...
 
  * My buddy list might be damaged, but i get quite a few of the ones with
a space in the beginning of the name. Probably due to that i usually
write minion1, minion2 and so on, with a comma-space in between.
 
 We had several versions during development that added spaces and even
 commas to the tags that were written to the data file. Might be worth
 cleaning that up.
 

There was a bug in the buddy tag widget, always storing the non-first
buddys with a space in the begining of that name.

I just sent a patch to remove that space but i thought it looked
better with a space there, so maybe we should update the buddy-filter
code to .trim() the strings instead of taking that patch...

//Anton

-- 
Anton Lundin+46702-161604
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH] Don't add space between buddy tags

2014-11-05 Thread Dirk Hohndel
I don't understand the commit message. Can you elaborat? What does this
fix? Your commit message seems to imply that things were better WITHOUT
your commit...

/D

On Wed, Nov 05, 2014 at 10:54:33PM +0100, Anton Lundin wrote:
 The second buddy tag will then contain a space, due to that the internal
 splitter is the comma, and not the ,space.
 
 It actually looked better in the ui with ,space.
 
 Signed-off-by: Anton Lundin gla...@acc.umu.se
 ---
  qt-ui/maintab.cpp | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
 index 545632f..b5cde40 100644
 --- a/qt-ui/maintab.cpp
 +++ b/qt-ui/maintab.cpp
 @@ -923,7 +923,7 @@ void MainTab::on_buddy_textChanged()
   QStringList text_list = ui.buddy-toPlainText().split(,, 
 QString::SkipEmptyParts);
   for (int i = 0; i  text_list.size(); i++)
   text_list[i] = text_list[i].trimmed();
 - QString text = text_list.join(, );
 + QString text = text_list.join(,);
   free(displayed_dive.buddy);
   displayed_dive.buddy = strdup(text.toUtf8().data());
   markChangedWidget(ui.buddy);
 @@ -936,7 +936,7 @@ void MainTab::on_divemaster_textChanged()
   QStringList text_list = ui.divemaster-toPlainText().split(,, 
 QString::SkipEmptyParts);
   for (int i = 0; i  text_list.size(); i++)
   text_list[i] = text_list[i].trimmed();
 - QString text = text_list.join(, );
 + QString text = text_list.join(,);
   free(displayed_dive.divemaster);
   displayed_dive.divemaster = strdup(text.toUtf8().data());
   markChangedWidget(ui.divemaster);
 -- 
 1.9.1
 
 ___
 subsurface mailing list
 subsurface@subsurface-divelog.org
 http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface