git.lucas.co / cce-designer
graphic design tool
git clone https://git.lucas.co/cce-designer.git

commit83d0da1d3d90aa2646bd08497a495f8029b04677
parent19415db7c1
authorLucas Galante <[email protected]>
date2026-09-20 21:17
Sync parameters to the project only when a tick changed a value

The per-frame sync ran on every params-pane tick that reported change —
every frame of a scroll glide — cloning and comparing the whole
parameter list each time: the choppy params scroll. Gated on the pane's
take_tick_value_change now, so a picker stream still applies live.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

 src/app.rs | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/app.rs b/src/app.rs
index 34cdc8b..4a0d994 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -7444,8 +7444,20 @@ pub(crate) fn geometry_to_spreadsheet_data(geom: &Detail) -> (Vec<String>, Vec<V
         // Live-streaming param widgets (the color picker's --stream lines)
         // change row values inside tick — push them through the same sync the
         // input path uses so they apply while the picker stays open.
+        // ...but only when a VALUE changed: the pane's tick also reports
+        // change for every frame of a scroll glide / coast and the scrollbar
+        // reveal window, and syncing the whole parameter list on each of
+        // those (clone + compare every param) made the params scroll choppy.
         if param_ticked {
-            self.sync_parameters_to_project();
+            let streamed = self
+                .slots
+                .param
+                .as_any_mut()
+                .downcast_mut::<cce_ui::widget::ParametersBg>()
+                .map_or(false, |p| p.take_tick_value_change());
+            if streamed {
+                self.sync_parameters_to_project();
+            }
         }
         if cce_ui::widget::hover_animation::tick(dt) {
             tick_changed = true;