DateTimeDialog.cpp   DateTimeDialog.cpp 
skipping to change at line 124 skipping to change at line 124
minute = dmin; minute = dmin;
second = ds; second = ds;
pushToWidgets(); pushToWidgets();
StelApp::getInstance().getCore()->setJDay(newJd()); StelApp::getInstance().getCore()->setJDay(newJd());
return true; return true;
} }
bool DateTimeDialog::validJd(double jday) bool DateTimeDialog::validJd(double jday)
{ {
pushToWidgets(); pushToWidgets();
// local tz -> UTC StelApp::getInstance().getCore()->setJDay(jday+StelApp::getInstance(
StelApp::getInstance().getCore()->setJDay(jday-StelApp::getInstance( ).getCore()->getDeltaT(jday)/86400.);
).getLocaleMgr().getGMTShift(jday)/24.+StelApp::getInstance().getCore()->ge
tDeltaT(jday)/86400.);
return true; return true;
} }
bool DateTimeDialog::validMjd(double mjday) bool DateTimeDialog::validMjd(double mjday)
{ {
pushToWidgets(); pushToWidgets();
// local tz -> UTC StelApp::getInstance().getCore()->setMJDay(mjday+StelApp::getInstanc
StelApp::getInstance().getCore()->setMJDay(mjday-StelApp::getInstanc e().getCore()->getDeltaT(mjday)/86400.);
e().getLocaleMgr().getGMTShift(mjday)/24.+StelApp::getInstance().getCore()-
>getDeltaT(mjday)/86400.);
return true; return true;
} }
void DateTimeDialog::retranslate() void DateTimeDialog::retranslate()
{ {
if (dialog) { if (dialog) {
ui->retranslateUi(dialog); ui->retranslateUi(dialog);
} }
} }
void DateTimeDialog::styleChanged() void DateTimeDialog::styleChanged()
{ {
// Nothing for now // Nothing for now
} }
void DateTimeDialog::close() void DateTimeDialog::close()
{ {
ui->dateTimeBox->setFocus(); ui->dateTimeTab->setFocus();
StelDialog::close(); StelDialog::close();
} }
/************************************************************************ /************************************************************************
year slider or dial changed year slider or dial changed
************************************************************************/ ************************************************************************/
void DateTimeDialog::yearChanged(int newyear) void DateTimeDialog::yearChanged(int newyear)
{ {
if ( year != newyear ) if ( year != newyear )
skipping to change at line 264 skipping to change at line 262
/************************************************************************ /************************************************************************
Send newJd to spinner_* Send newJd to spinner_*
************************************************************************/ ************************************************************************/
void DateTimeDialog::setDateTime(double newJd) void DateTimeDialog::setDateTime(double newJd)
{ {
if (this->visible()) { if (this->visible()) {
// Add in a DeltaT correction. Divide DeltaT by 86400 to con vert from seconds to days. // Add in a DeltaT correction. Divide DeltaT by 86400 to con vert from seconds to days.
double deltaT = 0.; double deltaT = 0.;
if (StelApp::getInstance().getCore()->getCurrentLocation().p lanetName=="Earth") if (StelApp::getInstance().getCore()->getCurrentLocation().p lanetName=="Earth")
deltaT = StelApp::getInstance().getCore()->getDeltaT (newJd)/86400.; deltaT = StelApp::getInstance().getCore()->getDeltaT (newJd)/86400.;
double newJdC = newJd - deltaT;
newJd += (StelApp::getInstance().getLocaleMgr().getGMTShift( newJd)/24.0-deltaT); // UTC -> local tz newJd += (StelApp::getInstance().getLocaleMgr().getGMTShift( newJd)/24.0-deltaT); // UTC -> local tz
StelUtils::getDateFromJulianDay(newJd, &year, &month, &day); StelUtils::getDateFromJulianDay(newJd, &year, &month, &day);
StelUtils::getTimeFromJulianDay(newJd, &hour, &minute, &seco nd); StelUtils::getTimeFromJulianDay(newJd, &hour, &minute, &seco nd);
jd = newJd; jd = newJdC;
mjd = newJd-2400000.5; mjd = newJdC-2400000.5;
pushToWidgets(); pushToWidgets();
} }
} }
 End of changes. 5 change blocks. 
11 lines changed or deleted 8 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/