Fix machine settings not applying until restart#267
Merged
Conversation
knipknap
force-pushed
the
fix/machine-settings-not-applied
branch
2 times, most recently
from
June 1, 2026 10:08
f1e9726 to
20e72ae
Compare
Closes #266 Several machine settings changes were not propagating to listeners until the app was restarted. This fixes multiple root causes: - set_driver()/set_driver_args() now emit changed signal synchronously instead of relying solely on the async rebuild_driver callback - _hydrated_dialect cache is cleared when dialect UID or dialect definitions change, preventing stale G-code dialect usage - JogWidget now listens to machine.changed to update button sensitivity and limit status when machine settings change - WorkSurface incremental update path now calls _update_pipeline_view_context() so canvas reflects non-dimension changes (e.g. laser colors, margins) - LaserListEditor signal handler is disconnected on dialog destroy to prevent memory leak - Added Machine.set_supports_arcs() setter replacing direct attribute mutation in the advanced preferences page - Added Machine.clear_soft_limits() replacing direct _soft_limits attribute access in hardware page - Added equality guards to set_home_on_start, set_max_travel_speed, set_max_cut_speed, set_acceleration, set_origin, and set_soft_limits_enabled to avoid unnecessary signals
knipknap
force-pushed
the
fix/machine-settings-not-applied
branch
from
June 1, 2026 10:45
20e72ae to
c3edcff
Compare
|
Seems to be working fine 👍 |
Contributor
Author
|
Awesome, thank you for testing! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #266
Several machine settings changes were not propagating to listeners until the app was restarted. This fixes multiple root causes:
Critical Fixes
set_driver()/set_driver_args()emitchangedsynchronously — These were the only setters that didn't emitmachine.changed, relying solely on an asyncrebuild_drivercallback. This meant pipeline recalculation, persistence, and UI updates were all delayed or lost if the async chain failed._hydrated_dialectcache cleared on dialect change — Once hydrated, thedialectproperty returned a stale cached value even after the user changed the dialect in settings.UI Fixes
JogWidgetnow listens tomachine.changed— Jog button sensitivity, home button visibility, and soft limit warnings now update when machine settings change.WorkSurfaceincremental update path calls_update_pipeline_view_context()— Non-dimension changes (laser colors, margins) now render on the 2D canvas immediately instead of requiring a zoom/pan.Memory Leak Fix
LaserListEditorsignal handler disconnected on dialog destroy — Prevented GC of the editor and all its widgets on every dialog open/close cycle.API Improvements
Machine.set_supports_arcs()setter — Replaces direct attribute mutation + manualchanged.send()in the advanced preferences page.Machine.clear_soft_limits()method — Replaces direct_soft_limits = Noneaccess in the hardware page.set_home_on_start,set_max_travel_speed,set_max_cut_speed,set_acceleration,set_origin, andset_soft_limits_enablednow skip unnecessary signals when the value hasn't changed.Files Changed
rayforge/machine/models/machine.py— Core model fixesrayforge/ui_gtk/machine/jog_widget.py— Machine change listenerrayforge/ui_gtk/canvas2d/surface.py— Pipeline view context updaterayforge/ui_gtk/machine/laser_preferences_page.py— Signal leak fixrayforge/ui_gtk/machine/advanced_preferences_page.py— Use new setterrayforge/ui_gtk/machine/hardware_page.py— Use clear_soft_limits()