3Dickulus / FragM

Derived from https://github.com/Syntopia/Fragmentarium/
GNU General Public License v3.0
344 stars 30 forks source link

Reset group does not account for changes in default values #172

Closed loicvdb closed 3 years ago

loicvdb commented 3 years ago

Describe the bug Clicking "Reset group" only resets the sliders to the default value specified when opening the frag. When changing the default value it will reset to the previous one.

To Reproduce

  1. Change the default value of an uniform
  2. Click "Build"
  3. Click "Reset group"
  4. The slider is then reset to the previous value before the change

Expected behavior I would expect it to reset to the new default value right away without the need to reopen the frag or to reset all sliders.

Desktop (please complete the following information):

3Dickulus commented 3 years ago

I agree with expected behaviour.

With a single tab, "Build" seems to be doing some optimizing? by not completely destroying the widget list and recreating it from the sources (as it should) however, if you have 2 or more tabs open the widget list is completely rebuilt when switching tabs, the correct value is set as default after a switch.

Reset All does apply the new default value.

Investigating... should have a patch shortly...

3Dickulus commented 3 years ago

ok got a patch will commit and push after some testing :D