Skip to content

Commit

Permalink
Fix sizes of proportional hints
Browse files Browse the repository at this point in the history
  • Loading branch information
gzotti committed Oct 10, 2024
1 parent 9c6f3e6 commit 1085c15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/modules/Nebula.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ float Nebula::getHintSize(StelPainter& sPainter) const
const float size = 6.0f;
float scaledSize = 0.0f;
if (drawHintProportional)
scaledSize = static_cast<float>(getAngularRadius(Q_NULLPTR)) *(M_PI_180f*2.f)*static_cast<float>(sPainter.getProjector()->getPixelPerRadAtCenter());
scaledSize = static_cast<float>(getAngularRadius(Q_NULLPTR)) *(M_PI_180f/2.f)*static_cast<float>(sPainter.getProjector()->getPixelPerRadAtCenter());
if (nType==NebRegion)
scaledSize = 12.f;

Expand Down
3 changes: 3 additions & 0 deletions src/core/modules/Nebula.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ friend class NebulaMgr;
QString getEnglishName() const override {return englishName;}
QString getEnglishAliases() const;
QString getI18nAliases() const;
//! Return the angular radius of a circle containing the object as seen from the observer
//! with the circle center assumed to be at getJ2000EquatorialPos().
//! @return radius in degree. This value is the apparent angular size of the object, and is independent of the current FOV.
double getAngularRadius(const StelCore*) const override;
SphericalRegionP getRegion() const override {return pointRegion;}

Expand Down

0 comments on commit 1085c15

Please sign in to comment.