[Kstars-devel] KDE/kdeedu/kstars/kstars
Akarsh Simha
akarshsimha at gmail.com
Sat Dec 20 03:06:45 CET 2008
SVN commit 899152 by asimha:
+ Fix crash when the centered object is a constellation and the user
changes the sky culture
+ Make sure that reloadCNames cleares the existing list of
constellation names.
CCMAIL: kstars-devel at kde.org
M +8 -0 kstarsactions.cpp
M +1 -0 skycomponents/skymapcomposite.cpp
--- trunk/KDE/kdeedu/kstars/kstars/kstarsactions.cpp #899151:899152
@@ -407,9 +407,17 @@
void KStars::slotApplyConfigChanges() {
Options::self()->writeConfig();
+
+ // If the focus object was a constellation and the sky culture has changed, remove the focus object
+ if( map()->focusObject() && map()->focusObject()->type() == SkyObject::CONSTELLATION && kstarsData->skyComposite()->currentCulture() != kstarsData->skyComposite()->getCultureName( (int)Options::skyCulture() ) ) {
+ map()->setClickedObject( NULL );
+ map()->setFocusObject( NULL );
+ }
+
applyConfig();
data()->setFullTimeUpdate();
map()->forceUpdate();
+
kstarsData->skyComposite()->setCurrentCulture( kstarsData->skyComposite()->getCultureName( (int)Options::skyCulture() ) );
kstarsData->skyComposite()->reloadCLines( kstarsData );
kstarsData->skyComposite()->reloadCNames( kstarsData );
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/skymapcomposite.cpp #899151:899152
@@ -499,6 +499,7 @@
}
void SkyMapComposite::reloadCNames( KStarsData *data ) {
+ objectNames(SkyObject::CONSTELLATION).clear();
if( m_CNames )
delete m_CNames;
m_CNames = new ConstellationNamesComponent( this );
More information about the Kstars-devel
mailing list