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

Victor Carbune victor.carbune at gmail.com
Sun Jun 27 19:45:28 CEST 2010


SVN commit 1143416 by vcarbune:

Solved a bug that causes KStars to crash.
If two or more objects are selected on the Observing List and double clicked, kstars crashes.
Just added an extra check to see how many objects are selected.

CCMAIL:kstars-devel at kde.org


 M  +9 -0      observinglist.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/tools/observinglist.cpp #1143415:1143416
@@ -581,10 +581,19 @@
 }
 
 void ObservingList::slotCenterObject() {
+    QModelIndexList selectedItems;
+    if (sessionView) {
+        selectedItems = ui->SessionView->selectionModel()->selectedRows();
+    } else {
+        selectedItems = ui->TableView->selectionModel()->selectedRows();
+    }
+
+    if (selectedItems.size() == 1) {
     ks->map()->setClickedObject( currentObject() );
     ks->map()->setClickedPoint( currentObject() );
     ks->map()->slotCenter();
 }
+}
 
 void ObservingList::slotSlewToObject()
 {


More information about the Kstars-devel mailing list