[Kstars-devel] branches/KDE/4.3/kdeedu/kstars/kstars/dialogs

Akarsh Simha akarshsimha at gmail.com
Sun Oct 25 00:56:24 CEST 2009


SVN commit 1039932 by asimha:

Backporting fixes to the details dialog to 4.3
(revisions 1039917, 1039918, and 1039925)

CCMAIL: kstars-devel at kde.org



 M  +8 -10     detaildialog.cpp  


--- branches/KDE/4.3/kdeedu/kstars/kstars/dialogs/detaildialog.cpp #1039931:1039932
@@ -481,10 +481,10 @@
     Links->ImageTitleList->clear();
 
     foreach ( const QString &s, selectedObject->InfoTitle() )
-    Links->InfoTitleList->addItem( s );
+        Links->InfoTitleList->addItem( s );
 
     foreach ( const QString &s, selectedObject->ImageTitle() )
-    Links->ImageTitleList->addItem( s );
+        Links->ImageTitleList->addItem( s );
 
     updateButtons();
 }
@@ -517,11 +517,10 @@
 
     if ( m_CurrentLink->listWidget() == Links->InfoTitleList )
     {
-        row = selectedObject->InfoTitle().indexOf( m_CurrentLink->text() );
-        if ( row < 0 ) return;
+        row = Links->InfoTitleList->row( m_CurrentLink );
 
         currentItemTitle = m_CurrentLink->text();
-        currentItemURL   = selectedObject->InfoList()[row];
+        currentItemURL = selectedObject->InfoTitle().at( row );
         search_line = selectedObject->name();
         search_line += ':';
         search_line += currentItemTitle;
@@ -531,11 +530,10 @@
     }
     else if ( m_CurrentLink->listWidget() == Links->ImageTitleList )
     {
-        row = selectedObject->ImageTitle().indexOf( m_CurrentLink->text() );
-        if ( row < 0 ) return;
+        row = Links->ImageTitleList->row( m_CurrentLink );
 
         currentItemTitle = m_CurrentLink->text();
-        currentItemURL   = selectedObject->ImageList()[row];
+        currentItemURL = selectedObject->ImageTitle().at( row ); 
         search_line = selectedObject->name();
         search_line += ':';
         search_line += currentItemTitle;
@@ -612,7 +610,7 @@
 
     if ( m_CurrentLink->listWidget() == Links->InfoTitleList )
     {
-        row = selectedObject->InfoTitle().indexOf( m_CurrentLink->text() );
+        row = Links->InfoTitleList->row( m_CurrentLink );
         currentItemTitle = m_CurrentLink->text();
         currentItemURL   = selectedObject->InfoList()[row];
         LineEntry = selectedObject->name();
@@ -624,7 +622,7 @@
     }
     else if ( m_CurrentLink->listWidget() == Links->ImageTitleList )
     {
-        row = selectedObject->ImageTitle().indexOf( m_CurrentLink->text() );
+        row = Links->ImageTitleList->row( m_CurrentLink );
         currentItemTitle = m_CurrentLink->text();
         currentItemURL   = selectedObject->ImageList()[row];
         LineEntry = selectedObject->name();


More information about the Kstars-devel mailing list