<div dir="ltr">it seems that my mail client messed them up. Patches reattached.<div><br></div><div>regards,<br>Gehad</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 9, 2015 at 3:34 AM, Dirk Hohndel <span dir="ltr"><<a href="mailto:dirk@hohndel.org" target="_blank">dirk@hohndel.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Even though this was sent as an attachment, it's still completely<br>
whitespace damaged & word wrapped.<br>
<br>
I know you've sent me many good patches in the past, so I'm not sure what<br>
went wrong here...<br>
<br>
/D<br>
<div><div class="h5"><br>
On Sun, Feb 08, 2015 at 11:38:38PM +0200, Gehad Elrobey wrote:<br>
> Null values should be handeled nicely instead of showing NULL or Nan.<br>
><br>
> Signed-off-by: Gehad elrobey <<a href="mailto:gehadelrobey@gmail.com">gehadelrobey@gmail.com</a>><br>
> ---<br>
>  qt-ui/divelogexportdialog.cpp | 9 ++++++---<br>
>  1 file changed, 6 insertions(+), 3 deletions(-)<br>
><br>
> diff --git a/qt-ui/divelogexportdialog.cpp b/qt-ui/divelogexportdialog.cpp<br>
> index b672601..43c4155 100644<br>
> --- a/qt-ui/divelogexportdialog.cpp<br>
> +++ b/qt-ui/divelogexportdialog.cpp<br>
> @@ -201,9 +201,12 @@ void DiveLogExportDialog::exportHTMLstatistics(const<br>
> QString &filename)<br>
>   out << "\"AVG_SAC\":\"" << get_volume_string(stats_yearly[i].avg_sac) <<<br>
> "\",";<br>
>   out << "\"MIN_SAC\":\"" << get_volume_string(stats_yearly[i].min_sac) <<<br>
> "\",";<br>
>   out << "\"MAX_SAC\":\"" << get_volume_string(stats_yearly[i].max_sac) <<<br>
> "\",";<br>
> - out << "\"AVG_TEMP\":\"" << QString::number(stats_yearly[i].combined_temp<br>
> / stats_yearly[i].combined_count, 'f', 1) << "\",";<br>
> - out << "\"MIN_TEMP\":\"" << get_temp_units(stats_yearly[i].min_temp,<br>
> NULL) << "\",";<br>
> - out << "\"MAX_TEMP\":\"" << get_temp_units(stats_yearly[i].max_temp,<br>
> NULL) << "\",";<br>
> + if ( stats_yearly[i].combined_count )<br>
> + out << "\"AVG_TEMP\":\"" << QString::number(stats_yearly[i].combined_temp<br>
> / stats_yearly[i].combined_count, 'f', 1) << "\",";<br>
> + else<br>
> + out << "\"AVG_TEMP\":\"0.0\",";<br>
> + out << "\"MIN_TEMP\":\"" << ( stats_yearly[i].min_temp == 0 ? 0 :<br>
> get_temp_units(stats_yearly[i].min_temp, NULL)) << "\",";<br>
> + out << "\"MAX_TEMP\":\"" << ( stats_yearly[i].max_temp == 0 ? 0 :<br>
> get_temp_units(stats_yearly[i].max_temp, NULL)) << "\",";<br>
>   out << "},";<br>
>   total_stats.selection_size += stats_yearly[i].selection_size;<br>
>   total_stats.total_time.seconds += stats_yearly[i].total_time.seconds;<br>
> --<br>
> 1.9.1<br>
<br>
</div></div>> _______________________________________________<br>
> subsurface mailing list<br>
> <a href="mailto:subsurface@subsurface-divelog.org">subsurface@subsurface-divelog.org</a><br>
> <a href="http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface" target="_blank">http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface</a><br>
<br>
</blockquote></div><br></div>