Ui::response
only works if UiBuilder::id_salt
is uniquely set
#5190
Labels
bug
Something is broken
Milestone
Ui
:s: addUiBuilder::sense
andUi::response
#5054The widget id used for the interact/response of
Ui
is currentlyUi::id
, which has a problem: is not necessarily unique.We should instead use an
Id
that is globally unique, i.e. based on where in the hierarchy theUi
is, i.e. based onnext_auto_id_salt
. I believe this means we need to store this inUi
so we can use the sameId
inremember_min_rect
.To see the problem with the current code, just apply this diff:
This also means the drag-and-drop demo uses the same
Id
for all drag-sources, which exsasserbatesUi::with_layer_id
panics when givenLayerId
is different from theUi
's current one. #5178The text was updated successfully, but these errors were encountered: