lkml.org 
[lkml]   [2020]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 2/5] kconfig: qconf: ensure that only one item will be highlighted
Date
The logic which is used by search to show a new link lacks
support for un-selecting a previously-selected item.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
scripts/kconfig/qconf.cc | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 0e06afa08908..67dac2406a98 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1662,6 +1662,13 @@ void ConfigMainWindow::setMenuLink(struct menu *menu)
}

if (list) {
+ /* Clear an already-selected item */
+ if (!list->selectedItems().isEmpty()) {
+ item = (ConfigItem*)list->selectedItems().first();
+ if (item)
+ item->setSelected(false);
+ }
+
item = list->findConfigItem(menu);
if (item) {
item->setSelected(true);
--
2.26.2
\
 
 \ /
  Last update: 2020-06-29 23:36    [W:0.144 / U:1.660 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site