[rkward-cvs] SF.net SVN: rkward:[2981] trunk/rkward/rkward/windows

tfry at users.sourceforge.net tfry at users.sourceforge.net
Tue Aug 31 11:28:27 UTC 2010


Revision: 2981
          http://rkward.svn.sourceforge.net/rkward/?rev=2981&view=rev
Author:   tfry
Date:     2010-08-31 11:28:27 +0000 (Tue, 31 Aug 2010)

Log Message:
-----------
Display the correct help page

Modified Paths:
--------------
    trunk/rkward/rkward/windows/rkhelpsearchwindow.cpp
    trunk/rkward/rkward/windows/rkhelpsearchwindow.h

Modified: trunk/rkward/rkward/windows/rkhelpsearchwindow.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkhelpsearchwindow.cpp	2010-08-31 10:52:48 UTC (rev 2980)
+++ trunk/rkward/rkward/windows/rkhelpsearchwindow.cpp	2010-08-31 11:28:27 UTC (rev 2981)
@@ -122,7 +122,7 @@
 	selection_layout->addWidget (findButton);
 
 	results = new RKHelpSearchResultsModel (this);
-	QSortFilterProxyModel *proxy_model = new QSortFilterProxyModel (this);
+	proxy_model = new QSortFilterProxyModel (this);
 	proxy_model->setSourceModel (results);
 	results_view = new QTreeView (this);
 	results_view->setRootIsDecorated (false);
@@ -208,7 +208,7 @@
 
 	if (!index.isValid ()) return;
 
-	int row = index.row ();
+	int row = proxy_model->mapToSource (index).row ();
 	QString topic = results->data (results->index (row, COL_TOPIC)).toString ();
 	QString package = results->data (results->index (row, COL_PACKAGE)).toString ();
 	if (topic.isEmpty ()) return;

Modified: trunk/rkward/rkward/windows/rkhelpsearchwindow.h
===================================================================
--- trunk/rkward/rkward/windows/rkhelpsearchwindow.h	2010-08-31 10:52:48 UTC (rev 2980)
+++ trunk/rkward/rkward/windows/rkhelpsearchwindow.h	2010-08-31 11:28:27 UTC (rev 2981)
@@ -2,7 +2,7 @@
                           rkhelpsearchwindow  -  description
                              -------------------
     begin                : Fri Feb 25 2005
-    copyright            : (C) 2005, 2006, 2007, 2009 by Thomas Friedrichsmeier
+    copyright            : (C) 2005, 2006, 2007, 2009, 2010 by Thomas Friedrichsmeier
     email                : tfry at users.sourceforge.net
  ***************************************************************************/
 
@@ -30,7 +30,7 @@
 class QPushButton;
 class RKHelpSearchResultsModel;
 class QTreeView;
-
+class QSortFilterProxyModel;
 class RCommandChain;
 
 /** Provides a UI interface for help-search.
@@ -64,6 +64,7 @@
 	QPushButton* findButton;
 	QTreeView* results_view;
 	RKHelpSearchResultsModel* results;
+	QSortFilterProxyModel* proxy_model;
 
 friend class RKWardMainWindow;
 	static RKHelpSearchWindow *main_help_search;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list