StelGuiItems.cpp   StelGuiItems.cpp 
skipping to change at line 581 skipping to change at line 581
x+=group.rightMargin; x+=group.rightMargin;
} }
updateText(true); updateText(true);
} }
// Make sure to avoid any change if not necessary to avoid triggering usele ss redraw // Make sure to avoid any change if not necessary to avoid triggering usele ss redraw
void BottomStelBar::updateText(bool updatePos) void BottomStelBar::updateText(bool updatePos)
{ {
StelCore* core = StelApp::getInstance().getCore(); StelCore* core = StelApp::getInstance().getCore();
double jd = core->getJDay(); double jd = core->getJDay();
double deltaT = 0.;
bool displayDeltaT = false;
if (StelApp::getInstance().getCore()->getCurrentLocation().planetNam
e=="Earth")
{
deltaT = StelUtils::getDeltaT(jd);
displayDeltaT = true;
}
QString newDate = flagShowTime ? StelApp::getInstance().getLocaleMgr // Add in a DeltaT correction. Divide DeltaT by 86400 to convert fro
().getPrintableDateLocal(jd) +" " m seconds to days.
+StelApp::getInstance().getLocaleMgr().getPrintableT QString newDate = flagShowTime ? StelApp::getInstance().getLocaleMgr
imeLocal(jd) : " "; ().getPrintableDateLocal(jd-deltaT/86400.) +" "
+StelApp::getInstance().getLocaleMgr().getPrintableT
imeLocal(jd-deltaT/86400.) : " ";
if (datetime->text()!=newDate) if (datetime->text()!=newDate)
{ {
updatePos = true; updatePos = true;
datetime->setText(newDate); datetime->setText(newDate);
if (displayDeltaT)
{
if (deltaT>60.)
datetime->setToolTip(QString("%1T = %2 (%3s)
").arg(QChar(0x0394)).arg(StelUtils::hoursToHmsStr(deltaT/3600.)).arg(delta
T, 5, 'f', 2));
else
datetime->setToolTip(QString("%1T = %2s").ar
g(QChar(0x0394)).arg(deltaT, 3, 'f', 3));
}
else
datetime->setToolTip("");
} }
QString newLocation = flagShowLocation ? q_(core->getCurrentLocation ().planetName) +", " QString newLocation = flagShowLocation ? q_(core->getCurrentLocation ().planetName) +", "
+core->getCurrentLocation().name + ", " +core->getCurrentLocation().name + ", "
// xgettext:no-c-format // xgettext:no-c-format
+q_("%1m").arg(core->getCurrentLocation().altitude) : " "; +q_("%1m").arg(core->getCurrentLocation().altitude) : " ";
if (location->text()!=newLocation) if (location->text()!=newLocation)
{ {
updatePos = true; updatePos = true;
location->setText(newLocation); location->setText(newLocation);
skipping to change at line 637 skipping to change at line 654
else else
{ {
fps->setText(""); fps->setText("");
} }
} }
if (updatePos) if (updatePos)
{ {
QRectF rectCh = getButtonsBoundingRect(); QRectF rectCh = getButtonsBoundingRect();
location->setPos(0, 0); location->setPos(0, 0);
datetime->setPos(rectCh.right()-datetime->boundingRect().wid int dtp = rectCh.right()-datetime->boundingRect().width()-5;
th()-5,0); if ((dtp%2) == 1) dtp--; // make even pixel
datetime->setPos(dtp,0);
fov->setPos(datetime->x()-200, 0); fov->setPos(datetime->x()-200, 0);
fps->setPos(datetime->x()-95, 0); fps->setPos(datetime->x()-95, 0);
} }
} }
void BottomStelBar::paint(QPainter*, const QStyleOptionGraphicsItem*, QWidg et*) void BottomStelBar::paint(QPainter*, const QStyleOptionGraphicsItem*, QWidg et*)
{ {
updateText(); updateText();
} }
 End of changes. 4 change blocks. 
6 lines changed or deleted 29 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/