r20021 by craig - Fix About Plugins window not changing item when using the keyboard

scribus-commit scribus-commit at lists.scribus.net
Sat Apr 25 16:06:11 UTC 2015


Author: craig
Date: Sat Apr 25 16:06:11 2015
New Revision: 20021

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20021
Log:
Fix About Plugins window not changing item when using the keyboard

Modified:
    trunk/Scribus/scribus/ui/aboutplugins.cpp
    trunk/Scribus/scribus/ui/aboutplugins.h

Modified: trunk/Scribus/scribus/ui/aboutplugins.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20021&path=/trunk/Scribus/scribus/ui/aboutplugins.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/aboutplugins.cpp (original)
+++ trunk/Scribus/scribus/ui/aboutplugins.cpp Sat Apr 25 16:06:11 2015
@@ -35,12 +35,12 @@
 	}
 	// Hook up a connection to update the plugin info when
 	// the selection changes
-	connect(pluginList, SIGNAL(itemClicked(QListWidgetItem*)), SLOT(displayPlugin(QListWidgetItem*)));
+	connect(pluginList, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), SLOT(displayPlugin(QListWidgetItem*,QListWidgetItem*)));
 	// and select the first plugin, if any
 	if (pluginList->count())
 	{
 		pluginList->setCurrentRow(0);
-		displayPlugin(pluginList->currentItem());
+		displayPlugin(pluginList->currentItem(), pluginList->currentItem());
 	}
 }
 
@@ -48,9 +48,11 @@
 {
 }
 
-void AboutPlugins::displayPlugin(QListWidgetItem* item)
+void AboutPlugins::displayPlugin(QListWidgetItem* currItem, QListWidgetItem* prevItem)
 {
-	int sel = pluginList->row(item);
+	Q_UNUSED(prevItem);
+
+	int sel = pluginList->row(currItem);
 	// Look up the list entry to get the plugin name and use
 	// it to grab the plugin instance and get its about data.
 	PluginManager& pluginManager = PluginManager::instance();

Modified: trunk/Scribus/scribus/ui/aboutplugins.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20021&path=/trunk/Scribus/scribus/ui/aboutplugins.h
==============================================================================
--- trunk/Scribus/scribus/ui/aboutplugins.h (original)
+++ trunk/Scribus/scribus/ui/aboutplugins.h Sat Apr 25 16:06:11 2015
@@ -26,7 +26,7 @@
 
 	private slots:
 		//! \brief Update the info on a new selection
-		void displayPlugin(QListWidgetItem* item);
+		void displayPlugin(QListWidgetItem* currItem, QListWidgetItem* prevItem);
 
 	private:
 		//! \brief Map list entry IDs to plugin names




More information about the scribus-commit mailing list