Page MenuHome

When a variable is deleted from the Console, then MathVis is not updated.
AcceptedPublic

Authored by Gaia Clary (gaiaclary) on Aug 28 2021, 2:14 PM.

Details

Summary

This patch makes sure that a variable is removed the MathVis item list right after it was removed
in the console. The patch uses the MathVis console hook VarStates:store_states()

Diff Detail

Event Timeline

Gaia Clary (gaiaclary) requested review of this revision.Aug 28 2021, 2:14 PM
Gaia Clary (gaiaclary) created this revision.

When a variable is removed from the console, then MathVis is not updated correctly.

This patch makes sure that a variable is removed the MathVis item list right after it was removed
in the console. The patch uses the MathVis console hook VarStates:store_states()

Gaia Clary (gaiaclary) edited the summary of this revision. (Show Details)Aug 28 2021, 3:01 PM
Gaia Clary (gaiaclary) edited the summary of this revision. (Show Details)

cleaned up one line (no functional change)

Campbell Barton (campbellbarton) requested changes to this revision.Aug 30 2021, 1:03 PM
Campbell Barton (campbellbarton) added inline comments.
space_view3d_math_vis/utils.py
54

This loop should be reversed, since removing multiple items won't work as expected if there are more than one index to remove.

This revision now requires changes to proceed.Aug 30 2021, 1:03 PM

Fixed order of removal in the MathVis element list
for correct deletion when multiple vars have been
dropped in the console.

This revision is now accepted and ready to land.Aug 30 2021, 3:07 PM