Merge lp:~alexwolf/stellarium/config-flags into lp:stellarium

Proposed by Alexander Wolf
Status: Merged
Merged at revision: 4918
Proposed branch: lp:~alexwolf/stellarium/config-flags
Merge into: lp:stellarium
Diff against target: 50 lines (+18/-2)
1 file modified
src/gui/StelGuiItems.cpp (+18/-2)
To merge this branch: bzr merge lp:~alexwolf/stellarium/config-flags
Reviewer Review Type Date Requested Status
treaves Approve
Review via email: mp+68660@code.launchpad.net
To post a comment you must log in.
Revision history for this message
treaves (treaves) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/gui/StelGuiItems.cpp'
--- src/gui/StelGuiItems.cpp 2011-06-24 02:59:23 +0000
+++ src/gui/StelGuiItems.cpp 2011-07-21 11:11:25 +0000
@@ -43,6 +43,7 @@
43#include <QGraphicsWidget>43#include <QGraphicsWidget>
44#include <QGraphicsProxyWidget>44#include <QGraphicsProxyWidget>
45#include <QGraphicsLinearLayout>45#include <QGraphicsLinearLayout>
46#include <QSettings>
4647
47StelButton::StelButton(QGraphicsItem* parent, const QPixmap& apixOn, const QPixmap& apixOff,48StelButton::StelButton(QGraphicsItem* parent, const QPixmap& apixOn, const QPixmap& apixOff,
48 const QPixmap& apixHover, QAction* aaction, bool noBackground) :49 const QPixmap& apixHover, QAction* aaction, bool noBackground) :
@@ -545,13 +546,21 @@
545 location->setText(newLocation);546 location->setText(newLocation);
546 }547 }
547548
549 QSettings* confSettings = StelApp::getInstance().getSettings();
548 QString str;550 QString str;
549 QTextStream wos(&str);551 QTextStream wos(&str);
550 wos << "FOV " << qSetRealNumberPrecision(3) << core->getMovementMgr()->getCurrentFov() << QChar(0x00B0);552 wos << "FOV " << qSetRealNumberPrecision(3) << core->getMovementMgr()->getCurrentFov() << QChar(0x00B0);
551 if (fov->text()!=str)553 if (fov->text()!=str)
552 {554 {
553 updatePos = true;555 updatePos = true;
554 fov->setText(str);556 if (confSettings->value("gui/flag_show_fov", true).toBool())
557 {
558 fov->setText(str);
559 }
560 else
561 {
562 fov->setText("");
563 }
555 }564 }
556565
557 str="";566 str="";
@@ -560,7 +569,14 @@
560 if (fps->text()!=str)569 if (fps->text()!=str)
561 {570 {
562 updatePos = true;571 updatePos = true;
563 fps->setText(str);572 if (confSettings->value("gui/flag_show_fps", true).toBool())
573 {
574 fps->setText(str);
575 }
576 else
577 {
578 fps->setText("");
579 }
564 }580 }
565581
566 if (updatePos)582 if (updatePos)