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};