From 2e4a6c3c328c08d01342a3d51b09de5aa9c70b91 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sun, 17 Jul 2022 16:12:59 -0400 Subject: [PATCH] If DX grid is blank, set DX astro params to zero. Do this in astrosub.f90, not asstro.cpp! --- lib/astrosub.f90 | 6 ++++++ widgets/astro.cpp | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/astrosub.f90 b/lib/astrosub.f90 index 0ca7b49cd..8e27a4a52 100644 --- a/lib/astrosub.f90 +++ b/lib/astrosub.f90 @@ -54,6 +54,12 @@ contains width1,width2,xlst8,techo8) if (len_trim(AzElFileName) .eq. 0) go to 999 + if(len(trim(hisgrid)).eq.0) then !If DX grid is blank, set these to zero: + AzMoonB8=0 + ElMoonB8=0 + ndop=0 + width2=0 + endif imin=60*uth8 isec=3600*uth8 ih=uth8 diff --git a/widgets/astro.cpp b/widgets/astro.cpp index 6437c0721..d90a29ed3 100644 --- a/widgets/astro.cpp +++ b/widgets/astro.cpp @@ -121,12 +121,6 @@ auto Astro::astroUpdate(QDateTime const& t, QString const& mygrid, QString const AzElFileName.toLocal8Bit ().constData (), jpleph.toLocal8Bit ().constData ()); - if(!hisgrid.size ()) { - azmoondx=0.0; - elmoondx=0.0; - m_dop=0; - width2=0.0; - } QString message; { QTextStream out {&message};