[Kstars-devel] KDE/kdeedu/kstars/kstars
Jason Harris
kstars at 30doradus.org
Thu Jan 24 18:21:59 CET 2008
SVN commit 765753 by harris:
Make the default startup position work again (it's supposed to be at
Az=180, Alt=45; i.e., 45 degrees above the south horizon).
CCMAIL: kstars-devel at kde.org
M +1 -7 kstarsactions.cpp
M +0 -5 kstarsdata.cpp
M +1 -1 kstarsdata.h
M +3 -3 kstarsinit.cpp
--- trunk/KDE/kdeedu/kstars/kstars/kstarsactions.cpp #765752:765753
@@ -166,13 +166,7 @@
// If the sky is in Horizontal mode and not tracking, reset focus such that
// Alt/Az remain constant.
- if ( data()->useDefaultOptions ) {
- SkyPoint newPoint;
- newPoint.setAz( Options::focusRA() );
- newPoint.setAlt( Options::focusDec() + 0.0001 );
- newPoint.HorizontalToEquatorial( LST(), geo()->lat() );
- map()->setDestination( &newPoint );
- } else if ( ! Options::isTracking() && Options::useAltAz() ) {
+ if ( ! Options::isTracking() && Options::useAltAz() ) {
map()->focus()->HorizontalToEquatorial( LST(), geo()->lat() );
}
--- trunk/KDE/kdeedu/kstars/kstars/kstarsdata.cpp #765752:765753
@@ -91,11 +91,6 @@
//standard directories and locale objects
locale = new KLocale( "kstars" );
- //Check to see if config file already exists. If not, set
- //useDefaultOptions = true
- QString fname = KStandardDirs::locateLocal( "config", "kstarsrc" );
- useDefaultOptions = ! ( QFile(fname).exists() );
-
m_SkyComposite = new SkyMapComposite( 0, this );
//Instantiate LST and HourAngle
--- trunk/KDE/kdeedu/kstars/kstars/kstarsdata.h #765752:765753
@@ -324,7 +324,7 @@
*/
// void initGuides( KSNumbers *num );
- bool useDefaultOptions, startupComplete;
+ bool startupComplete;
/*@short Appends telescope sky object to the list of INDI telescope objects. This enables KStars to track all telescopes properly.
*@param object pointer to telescope sky object
--- trunk/KDE/kdeedu/kstars/kstars/kstarsinit.cpp #765752:765753
@@ -635,10 +635,10 @@
void KStars::initFocus() {
SkyPoint newPoint;
- //If useDefaultOptions, then we set Az/Alt. Otherwise, set RA/Dec
- if ( data()->useDefaultOptions ) {
+
+ if ( Options::focusRA() == 180.0 && Options::focusDec() == 45.0 ) {
newPoint.setAz( Options::focusRA() );
- newPoint.setAlt( Options::focusDec() + 0.0001 );
+ newPoint.setAlt( Options::focusDec() );
newPoint.HorizontalToEquatorial( LST(), geo()->lat() );
} else {
newPoint.set( Options::focusRA(), Options::focusDec() );
More information about the Kstars-devel
mailing list