WIP: UI: dont run update functions if button values did not change #115831

Draft
Philipp Oeser wants to merge 2 commits from lichtwerk/blender:40009_b into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

2 Commits

Author SHA1 Message Date
Philipp Oeser 92def30fcb remove whitespace 2023-12-06 10:54:06 +01:00
Philipp Oeser 67510b89d3 UI: dont run update functions if button values did not change
Symptoms were recalculation in cases were these are not needed (e.g.
putting the same value as before on a heavy modifier property would give
a delay, same as selecting e.g. the same vertexgroup that was previously
selected). As shown in #40009, this delay could also end up swallowing
doublick-events, so on a heavy mesh e.g. a vertexgroup could not be
renamed by doublicking on it.

The doubleclick issue can be solved with event timestamps (see
efef709ec7 for this being done for linux), however the - unneccessary
- delay would still take place.

This PR skip RNA property set/update functions in case a button value
did not change, thus eliminating the delay.

It is basically the second try at this (see eb06ccc324 which got
reverted), but this time leaving the button handling code untouched.

Fixes #87448
Fixes #40009
2023-12-06 10:45:14 +01:00