threading now always on. alt code path remains for now

This commit is contained in:
Stewart Allen 2025-12-23 22:21:29 -05:00
commit 35b76802d1
2 changed files with 12 additions and 10 deletions

View file

@ -131,7 +131,7 @@ function setThreaded(bool) {
// upon restore, seed presets // upon restore, seed presets
api.event.emit('preset', api.conf.dbo()); api.event.emit('preset', api.conf.dbo());
api.event.on("set.threaded", bool => setThreaded(bool)); // api.event.on("set.threaded", bool => setThreaded(bool));
function booleanSave() { function booleanSave() {
let control = settings().controller; let control = settings().controller;
@ -161,7 +161,7 @@ function booleanSave() {
control.showOrigin = ui.showOrigin.checked; control.showOrigin = ui.showOrigin.checked;
control.showRulers = ui.showRulers.checked; control.showRulers = ui.showRulers.checked;
control.spaceRandoX = ui.spaceRandoX.checked; control.spaceRandoX = ui.spaceRandoX.checked;
control.threaded = setThreaded(ui.threaded.checked); // control.threaded = setThreaded(ui.threaded.checked);
control.webGPU = ui.webGPU.checked; control.webGPU = ui.webGPU.checked;
space.view.setZoom(control.reverseZoom, control.zoomSpeed); space.view.setZoom(control.reverseZoom, control.zoomSpeed);
// platform.layout(); // platform.layout();
@ -1044,7 +1044,7 @@ function init_one() {
_____: newGroup(LANG.pt_menu, $('prefs-prt'), {inline}), _____: newGroup(LANG.pt_menu, $('prefs-prt'), {inline}),
detail: newSelect(LANG.pt_qual_s, {title: LANG.pt_qual_l, action: detailSave}, "detail"), detail: newSelect(LANG.pt_qual_s, {title: LANG.pt_qual_l, action: detailSave}, "detail"),
healMesh: newBoolean(LANG.pt_heal_s, booleanSave, {title: LANG.pt_heal_l}), healMesh: newBoolean(LANG.pt_heal_s, booleanSave, {title: LANG.pt_heal_l}),
threaded: newBoolean(LANG.pt_thrd_s, booleanSave, {title: LANG.pt_thrd_l, modes:THREED}), // threaded: newBoolean(LANG.pt_thrd_s, booleanSave, {title: LANG.pt_thrd_l, modes:THREED}),
assembly: newBoolean(LANG.pt_assy_s, booleanSave, {title: LANG.pt_assy_l, modes:THREED}), assembly: newBoolean(LANG.pt_assy_s, booleanSave, {title: LANG.pt_assy_l, modes:THREED}),
webGPU: newBoolean(LANG.pt_wgpu_s, booleanSave, {title: LANG.pt_wgpu_l, modes:THREED}), webGPU: newBoolean(LANG.pt_wgpu_s, booleanSave, {title: LANG.pt_wgpu_l, modes:THREED}),
@ -1619,9 +1619,10 @@ function init_two() {
ui.showRulers.checked = control.showRulers; ui.showRulers.checked = control.showRulers;
ui.showSpeeds.checked = control.showSpeeds; ui.showSpeeds.checked = control.showSpeeds;
ui.spaceRandoX.checked = control.spaceRandoX; ui.spaceRandoX.checked = control.spaceRandoX;
ui.threaded.checked = setThreaded(control.threaded); // ui.threaded.checked = setThreaded(control.threaded);
ui.webGPU.checked = control.webGPU; ui.webGPU.checked = control.webGPU;
setThreaded(true);
lineTypeSave(); lineTypeSave();
detailSave(); detailSave();
updateStats(); updateStats();

View file

@ -756,11 +756,11 @@ function settingsPrusaConvert(data) {
}); });
} }
function setThreaded(bool) { // function setThreaded(bool) {
bool = bool ? true : false; // bool = bool ? true : false;
settings.controller.threaded = bool; // settings.controller.threaded = bool;
api.event.emit("set.threaded", bool); // api.event.emit("set.threaded", bool);
} // }
function setEnableWASM(bool) { function setEnableWASM(bool) {
bool = bool ? true : false; bool = bool ? true : false;
@ -786,7 +786,8 @@ const apiSet = {
update_fields: updateFieldsFromSettings, update_fields: updateFieldsFromSettings,
update_fields_from_range: updateFieldsFromRange, update_fields_from_range: updateFieldsFromRange,
set_enable_wasm: setEnableWASM, set_enable_wasm: setEnableWASM,
set_threaded: setThreaded, // set_threaded: setThreaded,
set_threaded() { console.trace('set_threaded deprecated' )},
restore: restoreSettings, restore: restoreSettings,
export: settingsExport, export: settingsExport,
import: settingsImport, import: settingsImport,