Page MenuHome

Fix T87448: Avoid uiBut update if value was same
ClosedPublic

Authored by Falk David (filedescriptor) on Apr 14 2021, 2:41 PM.

Details

Summary

Previously, clicking into a number field, changing nothing and then
clicking outside the field again would trigger an update (RNA prop
would be set to the same value again). This could potentially cause
an expensive operation (like a modifer) to run again, even if all the
parameters were identical.

The fix prevents this by treating unchanging values in the field as a
cancel operation.

Diff Detail

Repository
rB Blender
Branch
T87448 (branched from master)
Build Status
Buildable 14057
Build 14057: arc lint + arc unit

Event Timeline

Falk David (filedescriptor) requested review of this revision.Apr 14 2021, 2:41 PM
Falk David (filedescriptor) created this revision.
This revision is now accepted and ready to land.Apr 19 2021, 10:56 AM

Note that there may be unforeseen consequences, changes in button handling often have. For example scripts may use the update callback of a custom property to execute additional logic, which this change could affect.
Nevertheless I think this is save enough and worth a try.