-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non-working sliders when iterating through vector #654
Comments
In the first case, you work on copied data so actual values in foo don't change. Second example works since you work with the actual elements in the container. |
Hello, What @aytekaman said. The For the second, you need to resolve ID collision somehow as you can't have multiple fields in the same location with the same "float x" identifier. Otherwise all the sliders will react as they are the same one (if you push more than 1 item in your vector you will notice that). Please read the FAQ entry about usage of ID. You can do
If your values are pointers you can often push the pointer into the id stack. |
Also #74, #96, #480, #501, #647, #654, #719, #843, #894, #1057, #1173, #1390, #1414, #1556, #1768, #2041, #2116, #2330, #2475, #2562, #2667, #2807, #2885, #3102, #3375, #3526, #3964, #4008, #4070, #4158, #4172, #4199, #4375, #4395, #4471, #4548, #4612, #4631, #4657, #4796, #5210, #5303, #5360, #5393, #5533, #5692, #5707, #5729, #5773, #5787, #5884, #6046, #6093, #6186, #6223, #6364, #6387, #6567, #6692, #6724, #6939, #6984, #7246, #7270, #7375, #7421, #7434, #7472, #7581, #7724, #7926, #7937 and probably more.. Tagging to increase visibility!
I've found a pretty weird behavior where I can't influence slider values (I can drag, but the slider always snaps back to the original value).
Basically, the following fails:
but this works:
I'm not sure if this is expected behavior and/or can even be reproduced on other systems (I compiled with g++ 6.1.1), but I'd be interested in the reasons for the failure.
In the attachment, there is a full
main.cpp
(as a txt, because Github only allows those)main.cpp.txt
which can be dragged into
opengl_example
to reproduce the issue.The text was updated successfully, but these errors were encountered: