Patch : fixing profile scale if zoom is selected "S"
Guido Lerch
guido.lerch at gmail.com
Mon Oct 12 02:36:48 PDT 2015
I am sending this in as I believe we should consequently using the fully
available scale if the users selects "S", I have not changed the other
scales.
This patch makes changes to the x and y scale calculations if "S" is
selected.
--
Best regards,
Guido
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20151012/66e2a07f/attachment.html>
-------------- next part --------------
From 5d2780c2fa3c8dbe51ec71c34d4c7fc2396133b7 Mon Sep 17 00:00:00 2001
From: glerch <guido.lerch at gmail.com>
Date: Mon, 12 Oct 2015 11:32:57 +0200
Subject: [PATCH] Fixing profile scale if zoom selected
Despire some discussions I am sending this in as I believe we
should consequently use the full scale if the user selectes this
using the "S" button.
Signed-off-by: glerch <guido.lerch at gmail.com>
---
profile.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/profile.c b/profile.c
index cad7687..81bde79 100644
--- a/profile.c
+++ b/profile.c
@@ -71,10 +71,10 @@ int get_maxtime(struct plot_info *pi)
* calculate the space dynamically.
* This is seamless since 600/4 = 150.
*/
- if (seconds < 600)
- return ROUND_UP(seconds + seconds / 4, 60);
- else
- return ROUND_UP(seconds + 150, 60);
+ /* we should consequently allow the full available scale if
+ * zoomed_plot is selected
+ */
+ return ROUND_UP(seconds, 60);
} else {
/* min 30 minutes, rounded up to 5 minutes, with at least 2.5 minutes to spare */
return MAX(30 * 60, ROUND_UP(seconds + 150, 60 * 5));
@@ -91,7 +91,10 @@ int get_maxdepth(struct plot_info *pi)
if (prefs.zoomed_plot) {
/* Rounded up to 10m, with at least 3m to spare */
- md = ROUND_UP(mm + 3000, 10000);
+ /* we should consequently allow the full available scale if
+ * zoomed_plot is selected
+ */
+ md = ROUND_UP(mm , 10000);
} else {
/* Minimum 30m, rounded up to 10m, with at least 3m to spare */
md = MAX((unsigned)30000, ROUND_UP(mm + 3000, 10000));
--
1.9.5 (Apple Git-50.3)
More information about the subsurface
mailing list