Blender Git Commit Log

Git Commits -> Revision 3e03483

Revision 3e03483 by Bastien Montagne (master)
December 25, 2014, 11:55 (GMT)
Refactor 'immediate search' feature

Currently, code just checks whether a text-edited button uses a given icon (VIEWZOOM) to decide to apply changes on each typed char.

This patch adds a propper button flag (UI_BUT_TEXTEDIT_UPDATE) and a dedicated RNA flag (PROP_TEXTEDIT_UPDATE) for that.
It's also now usable not only for text buttons, but also for example for num buttons when in 'text edit' mode, etc.

It also fixes an actual bug, which is for text properties, in 'immediate' mode, hitting escape would not restore org value, because `ui_apply_but_TEX()` would set its orgstr to NULL on first call (giving it to `but->rename_orig` instead of copying it).

Note no change in behavior is expected from user POV.
Update for addons using that 'VIEWZOOM' icon 'feature' will follow (if any).

Reviewers: campbellbarton

Reviewed By: campbellbarton

Projects: #user_interface, #bf_blender:_next

Differential Revision: https://developer.blender.org/D938

Commit Details:

Full Hash: 3e034831de809cf0d65aec9f4d5b445f875dcff2
Parent Commit: 5f3dc59
Lines Changed: +59, -33

8 Modified Paths:

/release/scripts/startup/bl_ui/__init__.py (+1, -0) (Diff)
/source/blender/editors/include/UI_interface.h (+26, -25) (Diff)
/source/blender/editors/interface/interface_handlers.c (+15, -7) (Diff)
/source/blender/editors/interface/interface_utils.c (+8, -0) (Diff)
/source/blender/makesrna/intern/rna_space.c (+2, -0) (Diff)
/source/blender/makesrna/intern/rna_ui.c (+1, -0) (Diff)
/source/blender/makesrna/RNA_types.h (+5, -1) (Diff)
/source/blender/python/intern/bpy_props.c (+1, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021