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

Jason Harris kstars at 30doradus.org
Thu Jan 18 15:47:18 CET 2007


SVN commit 624954 by harris:

Two fixes for the find dialog:

+ use setCurrentItem() instead of setItemSelected() when setting the 
selected item to the default ("Andromeda Galaxy").  Prior to this 
change, any interaction with the list widget caused it to jump to the 
top of the list.

+ Add "short" comet names to SkyMapComposite's ObjectNames list.  The 
short names don't include the "C/" or "P/" prefix.  This change makes it 
easier to search for comets in the find dialog.

CCMAIL:kstars-devel at kde.org


 M  +2 -2      finddialog.cpp  
 M  +2 -2      skycomponents/cometscomponent.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/finddialog.cpp #624953:624954
@@ -108,7 +108,7 @@
 	if ( searchString.isEmpty() ) {
 		QListWidgetItem *defaultItem = ui->SearchList->findItems( i18n("Andromeda Galaxy"), Qt::MatchExactly )[0];
 		ui->SearchList->scrollToItem( defaultItem, QAbstractItemView::PositionAtTop );
-		ui->SearchList->setItemSelected( defaultItem, true );
+		ui->SearchList->setCurrentItem( defaultItem );
 
 	} else
 			selectFirstItem(); 
@@ -134,7 +134,7 @@
 
 void FindDialog::selectFirstItem() {
 	if( ui->SearchList->item(0))
-		ui->SearchList->setItemSelected( ui->SearchList->item(0), true );
+		ui->SearchList->setCurrentItem( ui->SearchList->item(0) );
 }
 
 void FindDialog::updateSelection() {
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/cometscomponent.cpp #624953:624954
@@ -69,8 +69,8 @@
 
 			objectList().append( com );
 
-			//Add name to the list of object names
-			objectNames().append( name );
+			//Add *short* name to the list of object names
+			objectNames().append( com->name() );
 		}
 	}
 }


More information about the Kstars-devel mailing list