Page MenuHome

Searchbox wrap around feature
Needs ReviewPublic

Authored by Don Miguel (don.miguel) on Tue, Feb 11, 5:59 PM.

Details

Summary

When the searchbox (via F3) is opened, the user cannot:

  1. Jump to the very last item when the active item is the very first item using the UP arrow key.
  2. Jump to the very first item when the active item is the very last item using the DOWN arrow key.

This patch adds two additional struct members to uiSearchItems (bool will_count_total_matches and unsigned int total_matches) so that it can tell when to calculate the total_matches (which is the actual total number of items that is a possible match based on the search string). It will only count the total number of matches when the active item in the search bar is the very first one (as an optimization). total_matches is used to count the number of items we need to skip from this code.

Also, I check if Object *ob is not NULL in source/blender/editors/sculpt_paint/sculpt.c : static bool sculpt_no_multires_poll because Blender would crash if I delete the cube and perform a search (F3) in the 'default scene' when you first open Blender.

Related task

Demo:

Diff Detail

Repository
rB Blender

Event Timeline

Don Miguel (don.miguel) changed the edit policy from "All Users" to "Don Miguel (don.miguel)".Tue, Feb 11, 6:10 PM
Don Miguel (don.miguel) changed the edit policy from "Don Miguel (don.miguel)" to "All Users".Tue, Feb 11, 6:24 PM

Please don’t add bf blender because everyone will get an email whenever a message or patch change happens

Please don’t add bf blender because everyone will get an email whenever a message or patch change happens

Sorry about that I didn't know.. I'm a first time contributor.

Please don’t add bf blender because everyone will get an email whenever a message or patch change happens

Sorry about that I didn't know.. I'm a

Please don’t add bf blender because everyone will get an email whenever a message or patch change happens

Sorry about that I didn't know.. I'm a first time contributor.

It’s okay