Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2021-11-25 17:00:06 +0300
committerBastien Montagne <bastien@blender.org>2021-11-25 17:00:06 +0300
commite216660382e46935e8241e9c877c0b2914481da9 (patch)
treec823e3fc85c3667dc7d0df1726da6d171d60a97f /source/blender/editors/interface
parent2378f057a050fff02cd87df305c06178c23ed83b (diff)
parente253fb2143e2a8f1de331d17343d44671ab6e440 (diff)
Merge branch 'blender-v3.0-release'
Conflicts: source/blender/windowmanager/intern/wm_files_link.c
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface_handlers.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index d18b3fdf505..fe540c3624c 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -1266,12 +1266,22 @@ static void ui_apply_but_TAB(bContext *C, uiBut *but, uiHandleButtonData *data)
static void ui_apply_but_NUM(bContext *C, uiBut *but, uiHandleButtonData *data)
{
if (data->str) {
+ /* This is intended to avoid unnecessary updates when the value stays the same, however there
+ * are issues with the current implementation. It does not work with multi-button editing
+ * (T89996) or operator popups where a number button requires an update even if the value is
+ * unchanged (T89996).
+ *
+ * Trying to detect changes at this level is not reliable. Instead it could be done at the
+ * level of RNA update/set, skipping RNA update if RNA set did not change anything, instead
+ * of skipping all button updates. */
+#if 0
double value;
/* Check if the string value is a number and cancel if it's equal to the startvalue. */
if (ui_but_string_eval_number(C, but, data->str, &value) && (value == data->startvalue)) {
data->cancel = true;
return;
}
+#endif
if (ui_but_string_set(C, but, data->str)) {
data->value = ui_but_value_get(but);