Autoslice + SliceDelay (#11407)

* Add auto slice after changes option

Introduces a new 'Auto slice after changes' setting in Preferences, allowing OrcaSlicer to automatically re-slice when slicing-related settings change. Implements logic in Plater to schedule auto-reslicing if the option is enabled and conditions are met, and sets the default to false in AppConfig.

* Improve auto-reslice scheduling after slice cancellation

Adds a flag to track when auto-reslice should be triggered after a slicing process is cancelled. Ensures that auto-reslice is scheduled once the current slicing process completes and is not lost if a slice is cancelled mid-operation.

* Add configurable delay for auto slice after change

Introduces a new 'auto_slice_change_delay_seconds' setting to control the delay before auto slicing starts after a change. Updates AppConfig to set a default value, adds a timer and logic in Plater to handle the delay, and exposes the setting in Preferences. This allows users to group multiple edits before triggering auto slicing.

* Combine auto-reslice checkbox and delay input in preferences

Replaces separate auto-reslice and delay settings with a unified UI element in Preferences. The new function create_item_auto_reslice adds both the checkbox and delay input in a single row, improving usability and code organization.

* Move auto reslice option into Control > Behaviour

* Remove 'loop' icon from AutoSlice

* Default disable and 1 Sec
This commit is contained in:
Ian Bassi
2025-12-18 09:44:31 -03:00
committed by GitHub
parent 2be0f0e05e
commit d092d6d9a7
4 changed files with 187 additions and 2 deletions

View File

@@ -111,6 +111,11 @@ void AppConfig::set_defaults()
if (get("background_processing").empty())
set_bool("background_processing", false);
#endif
if (get("auto_slice_after_change").empty())
set_bool("auto_slice_after_change", false);
if (get("auto_slice_change_delay_seconds").empty())
set("auto_slice_change_delay_seconds", "1");
if (get("drop_project_action").empty())
set_bool("drop_project_action", true);