core icon indicating copy to clipboard operation
core copied to clipboard

TreeView DND leaves items highlighted; NaN in TreeView

Open rcoreilly opened this issue 1 year ago • 2 comments

Describe the bug

image

Curiously, the Widget and its parts both have no state flags set, but the parts has a StateLayer of .1 that persists despite my attempt to reset it.

Also I caught the inspector tree disappearing, which I've noticed before. getting a NaN in Size.Actual.Total.X, which results in Pos.Total.X = NaN as well. This happens at the top node and propagates downward.

How to reproduce

this is in Core. hopefully can reproduce in simple views test.

Example code

No response

Relevant output

No response

Platform

macOS

rcoreilly avatar Mar 21 '24 18:03 rcoreilly

The culprit appears to be actStateLayer, which we can't see, that is getting stuck. Indeed renaming that so it is visible shows that it is stuck. somehow in the TV widget Style func, the s.StateLayer is 0.1 and then it goes to 0 at some later point.

Moved the relevant code to a StyleFinal and that fixed it. also the DragDrop clear was operating on the wrong node -- source actually is the correct node.

added log error for the NaN -- will keep an eye out for that (and keeping this ticket open until we get that resolved).

rcoreilly avatar Mar 21 '24 18:03 rcoreilly

This highlights the classic tradeoff of hiding fields.

kkoreilly avatar Mar 21 '24 19:03 kkoreilly