[Kstars-devel] KDE/kdeedu/kstars/kstars/tools

Jason Harris kstars at 30doradus.org
Sun Dec 2 06:50:05 CET 2007


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 @@
         }
     }
 
-    //we've removed all selected objects, so clear the list
+    //we've removed all selected objects, so clear the selection
     ui->TableView->selectionModel()->clear();
 }
 


More information about the Kstars-devel mailing list