[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [marble/esasocis-2012-eclipse] src/plugins/render/eclipses: EclipsesPlugin: Fix dates for very short
From:       Rene Kuettner <rene () bitkanal ! net>
Date:       2013-01-21 22:06:25
Message-ID: 20130121220625.0BB64A6091 () git ! kde ! org
[Download RAW message or body]

Git commit c5ca955ad35419aa62c90d4503b6e6e0be02a205 by Rene Kuettner.
Committed on 21/01/2013 at 23:03.
Pushed by renek into branch 'esasocis-2012-eclipse'.

EclipsesPlugin: Fix dates for very short eclipses

M  +4    -0    src/plugins/render/eclipses/EclipsesItem.cpp

http://commits.kde.org/marble/c5ca955ad35419aa62c90d4503b6e6e0be02a205

diff --git a/src/plugins/render/eclipses/EclipsesItem.cpp b/src/plugins/render/eclipses/EclipsesItem.cpp
index 63c3f44..5a28ec5 100644
--- a/src/plugins/render/eclipses/EclipsesItem.cpp
+++ b/src/plugins/render/eclipses/EclipsesItem.cpp
@@ -219,6 +219,10 @@ void EclipsesItem::initialize()
         m_endDatePartial = QDateTime( QDate( year, month, day ),
                                       QTime( hour, min, secs ),
                                       Qt::UTC ).addSecs( - ( tz * 3600 ) );
+    } else {
+        // duration is shorter than 1 min
+        m_startDatePartial = m_dateMaximum;
+        m_endDatePartial = m_dateMaximum;
     }
 
     m_isTotal = ( m_ecl->getTotal( mjd_start, mjd_end ) != 0 );
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic