[PATCH] Disable calc_ndl_tts for print
Anton Lundin
glance at acc.umu.se
Tue Dec 3 14:22:13 UTC 2013
NDL and TTS doesn't show up in the printed profiles, and it takes
significant time to calculate, so just don't do it.
Signed-off-by: Anton Lundin <glance at acc.umu.se>
---
qt-ui/printlayout.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/qt-ui/printlayout.cpp b/qt-ui/printlayout.cpp
index afc6dd0..0c4ecb4 100644
--- a/qt-ui/printlayout.cpp
+++ b/qt-ui/printlayout.cpp
@@ -147,6 +147,11 @@ void PrintLayout::printProfileDives(int divesPerRow, int divesPerColumn)
else
yOffsetTable = scaledH - tableH;
+ // Disable calc_ndl_tts while generating profiles for print
+ // It takes lots of time, and doesn't show up in the profiles.
+ short calc_ndl_tts = prefs.calc_ndl_tts;
+ prefs.calc_ndl_tts = FALSE;
+
// plot the dives at specific rows and columns on the page
int i, row = 0, col = 0;
struct dive *dive;
@@ -180,6 +185,7 @@ void PrintLayout::printProfileDives(int divesPerRow, int divesPerColumn)
// cleanup
painter.end();
delete table;
+ prefs.calc_ndl_tts = calc_ndl_tts;
profile->setFrameStyle(profileFrameStyle);
profile->setPrintMode(false);
profile->resize(originalSize);
--
1.8.3.2
More information about the subsurface
mailing list