2 Dec 06:50
KDE/kdeedu/kstars/kstars/tools
Jason Harris <kstars <at> 30doradus.org>
2007-12-02 05:50:05 GMT
2007-12-02 05:50:05 GMT
SVN commit 743859 by harris:
In the observing list, removing objects named "star" from the list now
removes the correct objects.
CCMAIL: kstars-devel <at> kde.org
M +12 -2 observinglist.cpp
--- trunk/KDE/kdeedu/kstars/kstars/tools/observinglist.cpp #743858:743859
@@ -233,7 +233,17 @@
QModelIndex mSortIndex = m_SortModel->index( irow, 0 );
QModelIndex mIndex = m_SortModel->mapToSource( mSortIndex );
foreach ( SkyObject *o, obsList() ) {
- if ( o->translatedName() == mIndex.data().toString() ) {
+ //Stars named "star" must be matched by coordinates
+ if ( o->name() == "star" ) {
+ int irow = mIndex.row();
+ QString ra = m_Model->item(irow, 1)->text();
+ QString dc = m_Model->item(irow, 2)->text();
+ if ( o->ra()->toHMSString() == ra && o->dec()->toDMSString() == dc ) {
+ slotRemoveObject( o );
+ break;
+ }
+
+ } else if ( o->translatedName() == mIndex.data().toString() ) {
slotRemoveObject( o );
break;
}
@@ -241,7 +251,7 @@
(Continue reading)
RSS Feed