"Bo Peng" <[EMAIL PROTECTED]> writes:

> On 10/18/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> Author: bpeng
>> Date: Fri Oct 19 05:09:14 2007
>> New Revision: 21050
>>
>> URL: http://www.lyx.org/trac/changeset/21050
>> Log:
>> PrefShortcuts: the buttons are almost usable now
>>
>
> The buttons are roughly working. The next patch will handle user.bind
> and \unbind.

I need the following patch to compile with qt 4.1. I cannot test
though because of the resource code.

Could you apply it if it is correct?

BTW, instead of selecting all matching lfuns as you seem to do, it
would be much better to hide all the others.

JMarc

svndiff src/frontends/qt4/

Index: src/frontends/qt4/GuiPrefs.cpp
===================================================================
--- src/frontends/qt4/GuiPrefs.cpp	(révision 21055)
+++ src/frontends/qt4/GuiPrefs.cpp	(copie de travail)
@@ -1869,11 +1869,11 @@ void PrefShortcuts::on_searchPB_pressed(
 	QList<QTreeWidgetItem *> const items = shortcutsTW->selectedItems();
 	// clear current selection
 	for (int i = 0; i < items.size(); ++i)
-		items[i]->setSelected(false);
+		shortcutsTW->setItemSelected(items[i], false);
 	for (int i = 0; i < matched.size(); ++i) {
 		if (matched[i]->flags() & Qt::ItemIsSelectable)
-			matched[i]->setSelected(true);
-		matched[i]->setExpanded(true);
+			shortcutsTW->setItemSelected(matched[i], true);
+		shortcutsTW->setItemExpanded(matched[i], true);
 	}
 	// scroll to the first selectable item
 	for (int i = 0; i < matched.size(); ++i)

Reply via email to