History

INtroduce range check for int value against the several enums we exposed through the js api for REnder and PErformance settings

Sam Gateau committed 7 years ago

Commit 9bc6c3b1 parent 34bae256 files · +10 −5Browse files

Showing the changes to interface/src/scripting/RenderScriptingInterface.cpp (1 of 6 files). Show all

Unified · Split

interface/src/scripting/RenderScriptingInterface.cpp+1−1
@@ -42,7 +42,7 @@ RenderScriptingInterface::RenderMethod RenderScriptingInterface::getRenderMethod · 41 unmodified lines
42}42}
43 43
44void RenderScriptingInterface::setRenderMethod(RenderMethod renderMethod) {44void RenderScriptingInterface::setRenderMethod(RenderMethod renderMethod) {
45 if (_renderMethod != (int) renderMethod) {45 if (isValidRenderMethod(renderMethod) && (_renderMethod != (int) renderMethod)) {
46 forceRenderMethod(renderMethod);46 forceRenderMethod(renderMethod);
47 emit settingsChanged();47 emit settingsChanged();
48 }48 }