From ade58079a0a3e6b9d1a0793ab4c084d0f9431f4d Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Fri, 24 Oct 2025 08:21:26 -0700 Subject: Update FilterEdit and FilterTarget to preserve existing selections The down and enter keys now preserve an existing selection in the associated list or table views, rather than unconditionally selecting or activating the first item. --- ui/filter.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'ui/filter.h') diff --git a/ui/filter.h b/ui/filter.h index c354546f..98417f65 100644 --- a/ui/filter.h +++ b/ui/filter.h @@ -22,8 +22,16 @@ class BINARYNINJAUIAPI FilterTarget virtual void setFilter(const std::string& filter) = 0; virtual void scrollToFirstItem() = 0; virtual void scrollToCurrentItem() = 0; - virtual void selectFirstItem() = 0; - virtual void activateFirstItem() = 0; + + // Select an item, typically the first, if none is already selected. + virtual void ensureSelection() = 0; + + // Activate the selected item, typically in response to the user + // pressing the return key. + virtual void activateSelection() = 0; + + // Transfer focus away from the `FilterEdit`. By default, focus + // is transferred to `this` if it is an instance of `QWidget`. virtual void closeFilter(); }; -- cgit v1.3.1