mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: unlisted-recipients:; (no To-header on input)
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Maxim Levitsky <mlevitsk@redhat.com>,
	Masahiro Yamada <masahiroy@kernel.org>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 2/5] kconfig: qconf: ensure that only one item will be highlighted
Date: Mon, 29 Jun 2020 11:35:36 +0200	[thread overview]
Message-ID: <9cc77cb28cf641d537b3dd08892f3d655f26ffb2.1593423060.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1593423060.git.mchehab+huawei@kernel.org>

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


  parent reply	other threads:[~2020-06-29 21:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-29  9:35 [PATCH v2 0/5] Fix split view search and debug info navigation Mauro Carvalho Chehab
2020-06-29  9:35 ` [PATCH v2 1/5] kconfig: qconf: cleanup includes Mauro Carvalho Chehab
2020-06-29  9:35 ` Mauro Carvalho Chehab [this message]
2020-06-29  9:35 ` [PATCH v2 3/5] kconfig: qconf: make search fully work again on split mode Mauro Carvalho Chehab
2020-06-29  9:35 ` [PATCH v2 4/5] kconfig: qconf: make debug links work again Mauro Carvalho Chehab
2020-06-30  3:48   ` Masahiro Yamada
2020-06-29  9:35 ` [PATCH v2 5/5] kconfig: qconf: navigate menus on hyperlinks Mauro Carvalho Chehab
2020-06-30  2:49   ` Masahiro Yamada
2020-06-30  3:36   ` Masahiro Yamada
2020-06-30  6:25     ` Mauro Carvalho Chehab
2020-06-29 10:57 ` [PATCH] kconfig: qconf: re-implement setSelected() Mauro Carvalho Chehab
2020-06-29 12:23 ` [PATCH v2 0/5] Fix split view search and debug info navigation Maxim Levitsky
2020-06-29 14:46   ` Mauro Carvalho Chehab
2020-06-29 14:58     ` Maxim Levitsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9cc77cb28cf641d537b3dd08892f3d655f26ffb2.1593423060.git.mchehab+huawei@kernel.org \
    --to=mchehab+huawei@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=mlevitsk@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®