You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changing the model, i.e. the list of options, in a ComboBox does not also change affect the current-index or the current-value. Here is an demonstration of the issue in SlintPad.
In particular, the text in the box still shows the selected value from the previous model. Clicking the box and selecting one of the new items will fix the issue. Closing the selection box without making a new selection results in the text from the old model still being displayed.
It is possible that this is the intended behavior, but it seems to me that changing the model should also do the following:
Set the current-value to the text of first item in the new model so it at least is consistent with the new model.
Set the current-index either to 0 (the first new item) or -1 (no item selected).
For what it's worth, I am using Rust in both Windows and Linux, and this issue occurs on all platforms (including SlintPad). For now I have a workaround that performs the above steps, but it is a bit hacky and manual, but will made easier and more automatic once this feature is fully implemented and released.
The text was updated successfully, but these errors were encountered:
FloVanGH
added
a:widgets
Implementation of widgets (from std-widgets.slint) and their styles (mF,bS)
bug
Something isn't working
labels
May 10, 2024
Changing the
model
, i.e. the list of options, in aComboBox
does not also change affect thecurrent-index
or thecurrent-value
. Here is an demonstration of the issue in SlintPad.In particular, the text in the box still shows the selected value from the previous model. Clicking the box and selecting one of the new items will fix the issue. Closing the selection box without making a new selection results in the text from the old model still being displayed.
It is possible that this is the intended behavior, but it seems to me that changing the model should also do the following:
current-value
to the text of first item in the new model so it at least is consistent with the new model.current-index
either to 0 (the first new item) or -1 (no item selected).For what it's worth, I am using Rust in both Windows and Linux, and this issue occurs on all platforms (including SlintPad). For now I have a workaround that performs the above steps, but it is a bit hacky and manual, but will made easier and more automatic once this feature is fully implemented and released.
The text was updated successfully, but these errors were encountered: