[Kstars-devel] KDE/kdeedu/kstars/kstars/tools
Jason Harris
kstars at 30doradus.org
Mon Jan 28 07:24:48 CET 2008
SVN commit 767486 by harris:
Applying patch from Mederic Boquien to fix the display of month names
in the Equinox/Solstice calculator module. Will backport to 4.0.
Thanks Mederic!
CCMAIL: mederic.boquien at laposte.net
CCMAIL: kstars-devel at kde.org
M +7 -8 modcalcvizequinox.cpp
--- trunk/KDE/kdeedu/kstars/kstars/tools/modcalcvizequinox.cpp #767485:767486
@@ -52,12 +52,6 @@
Plot->axis(KPlotWidget::BottomAxis)->setVisible( false );
Plot->axis(KPlotWidget::TopAxis)->setVisible( false );
- long double jd0 = KStarsDateTime( QDate(Year->value(), 1, 1), QTime(0,0,0) ).djd();
- for ( int imonth=0; imonth < 12; imonth++ ) {
- KStarsDateTime kdt( QDate(Year->value(), imonth+1, 1), QTime(0,0,0) );
- DMonth[imonth] = kdt.djd() - jd0;
- }
-
//This will call slotCompute():
Year->setValue( ks->data()->lt().date().year() );
@@ -165,6 +159,13 @@
KSSun Sun( ks->data() );
int year0 = Year->value();
+ KStarsDateTime dt( QDate(year0, 1, 1), QTime(0,0,0) );
+ long double jd0 = dt.djd(); //save JD on Jan 1st
+ for ( int imonth=0; imonth < 12; imonth++ ) {
+ KStarsDateTime kdt( QDate(year0, imonth+1, 1), QTime(0,0,0) );
+ DMonth[imonth] = kdt.djd() - jd0;
+ }
+
Plot->removeAllPlotObjects();
//Add the celestial equator, just a single line bisecting the plot horizontally
@@ -179,8 +180,6 @@
KPlotObject *ecl = new KPlotObject( ks->data()->colorScheme()->colorNamed( "EclColor" ), KPlotObject::Lines, 2 );
ecl->setLinePen( QPen( ecl->pen().color(), 4 ) );
- KStarsDateTime dt( QDate(year0, 1, 1), QTime(0,0,0) );
- long double jd0 = dt.djd(); //save JD on Jan 1st
Plot->setLimits( 1.0, double(dt.date().daysInYear()), -30.0, 30.0 );
//Add top and bottom axis lines, and custom tickmarks at each month
More information about the Kstars-devel
mailing list