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

Akarsh Simha akarshsimha at gmail.com
Sun Oct 25 00:04:52 CEST 2009


SVN commit 1039909 by asimha:

Backporting fix in Detail dialog (revisions 1039902 and 1039907) to
4.3 branch.

Original commit log:

Use the signal currentItemChanged instead of itemClicked to monitor
changes to the list of links in the detail dialog. This makes sure
that the correct link is opened even when the user uses the keyboard
to navigate through the list of links.

CCMAIL: kstars-devel at kde.org



 M  +4 -4      detaildialog.cpp  


--- branches/KDE/4.3/kdeedu/kstars/kstars/dialogs/detaildialog.cpp #1039908:1039909
@@ -394,12 +394,12 @@
     connect( Links->RemoveLinkButton, SIGNAL(clicked()), this, SLOT( removeLinkDialog() ) );
 
     // When an item is selected in info list, selected items are cleared image list.
-    connect( Links->InfoTitleList, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT( setCurrentLink(QListWidgetItem*) ) );
-    connect( Links->InfoTitleList, SIGNAL(itemClicked(QListWidgetItem*)), Links->ImageTitleList, SLOT( clearSelection() ) );
+    connect( Links->InfoTitleList, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), this, SLOT( setCurrentLink(QListWidgetItem*) ) );
+    connect( Links->InfoTitleList, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), Links->ImageTitleList, SLOT( clearSelection() ) );
 
     // vice versa
-    connect( Links->ImageTitleList, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT( setCurrentLink(QListWidgetItem*) ) );
-    connect( Links->ImageTitleList, SIGNAL(itemClicked(QListWidgetItem*)), Links->InfoTitleList, SLOT( clearSelection() ));
+    connect( Links->ImageTitleList, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), this, SLOT( setCurrentLink(QListWidgetItem*) ) );
+    connect( Links->ImageTitleList, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), Links->InfoTitleList, SLOT( clearSelection() ));
 
     connect( Links->InfoTitleList, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT( viewLink() ) );
     connect( Links->ImageTitleList, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT( viewLink() ) );


More information about the Kstars-devel mailing list