[Kstars-devel] KDE/kdeedu/kstars/kstars
Jason Harris
kstars at 30doradus.org
Tue Oct 30 15:18:57 CET 2007
SVN commit 731040 by harris:
Make all line components except the horizon use the refraction
correction. This fixes the offset between contstellation line
vertices and the stars that define them.
TODO: move refraction correction to SkyPoint::EquatorialToHorizontal()
CCMAIL: kstars-devel at kde.org
M +4 -4 skycomponents/linelistcomponent.cpp
M +6 -6 skycomponents/linelistindex.cpp
M +2 -2 skycomponents/linelistlabel.cpp
M +1 -5 skymapevents.cpp
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/linelistcomponent.cpp #731039:731040
@@ -92,13 +92,13 @@
QPointF oThis, oLast, oMid;
pLast = points()->at( 0 );
- oLast = map->toScreen( pLast, false, &isVisibleLast );
+ oLast = map->toScreen( pLast, true, &isVisibleLast );
int limit = points()->size();
for ( int i=1 ; i < limit ; i++ ) {
pThis = points()->at( i );
- oThis = map->toScreen( pThis, false, &isVisible );
+ oThis = map->toScreen( pThis, true, &isVisible );
if ( map->onScreen(oThis, oLast ) ) {
if ( isVisible && isVisibleLast ) {
@@ -232,8 +232,8 @@
SkyPoint* pThis = points()->at( i );
SkyPoint* pLast = points()->at( i - 1 );
- QPointF oThis = map->toScreen( pThis, false );
- QPointF oLast = map->toScreen( pLast, false );
+ QPointF oThis = map->toScreen( pThis );
+ QPointF oLast = map->toScreen( pLast );
double sx = double( oThis.x() - oLast.x() );
double sy = double( oThis.y() - oLast.y() );
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/linelistindex.cpp #731039:731040
@@ -206,11 +206,11 @@
SkyList* points = lineList->points();
pLast = points->first();
- oLast = map->toScreen( pLast, false, &isVisibleLast );
+ oLast = map->toScreen( pLast, true, &isVisibleLast );
for ( int i = 1 ; i < points->size() ; i++ ) {
pThis = points->at( i );
- oThis = map->toScreen( pThis, false, &isVisible );
+ oThis = map->toScreen( pThis, true, &isVisible );
if ( map->onScreen( oThis, oLast) && ! skipAt( lineList, i ) ) {
@@ -263,11 +263,11 @@
SkyList* points = lineList->points();
pLast = points->first();
- oLast = map->toScreen( pLast, false, &isVisibleLast );
+ oLast = map->toScreen( pLast, true, &isVisibleLast );
for ( int i = 1 ; i < points->size() ; i++ ) {
pThis = points->at( i );
- oThis2 = oThis = map->toScreen( pThis, false, &isVisible );
+ oThis2 = oThis = map->toScreen( pThis, true, &isVisible );
if ( map->onScreen( oThis, oLast) && ! skipAt( lineList, i ) ) {
@@ -330,11 +330,11 @@
SkyList* points = lineList->points();
pLast = points->last();
- oLast = map->toScreen( pLast, false, &isVisibleLast );
+ oLast = map->toScreen( pLast, true, &isVisibleLast );
for ( int i = 0; i < points->size(); ++i ) {
pThis = points->at( i );
- oThis = map->toScreen( pThis, false, &isVisible );
+ oThis = map->toScreen( pThis, true, &isVisible );
if ( isVisible && isVisibleLast ) {
polygon << oThis;
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/linelistlabel.cpp #731039:731040
@@ -175,8 +175,8 @@
SkyPoint* pThis = list->at( i );
SkyPoint* pLast = list->at( i - 1 );
- QPointF oThis = map->toScreen( pThis, false );
- QPointF oLast = map->toScreen( pLast, false );
+ QPointF oThis = map->toScreen( pThis );
+ QPointF oLast = map->toScreen( pLast );
double sx = double( oThis.x() - oLast.x() );
double sy = double( oThis.y() - oLast.y() );
--- trunk/KDE/kdeedu/kstars/kstars/skymapevents.cpp #731039:731040
@@ -572,8 +572,6 @@
QString sX, sY, s;
sX = mousePoint()->az()->toDMSString(true); //true = force +/- symbol
sY = mousePoint()->alt()->toDMSString(true); //true = force +/- symbol
- if ( Options::useAltAz() && Options::useRefraction() )
- sY = refract( mousePoint()->alt(), true ).toDMSString(true);
s = sX + ", " + sY;
ks->statusBar()->changeItem( s, 1 );
@@ -679,15 +677,13 @@
setMousePoint( fromScreen( dx, dy, data->LST, data->geo()->lat() ) );
mousePoint()->EquatorialToHorizontal( data->LST, data->geo()->lat() );
setClickedPoint( mousePoint() );
+ clickedPoint()->EquatorialToHorizontal( data->LST, data->geo()->lat() );
//Find object nearest to clickedPoint()
double maxrad = 1000.0/Options::zoomFactor();
setClickedObject( data->skyComposite()->objectNearest( clickedPoint(), maxrad ) );
if ( clickedObject() ) {
- //DEBUG
- kDebug() << "clickedObject: " << clickedObject() << endl;
-
setClickedPoint( clickedObject() );
if ( e->button() == Qt::RightButton ) {
More information about the Kstars-devel
mailing list