Skip to content

fix: inspector dirty-tracking marks edits in equalizer/attenuator/combiner/filter drawers - #60

Merged
striderZA merged 2 commits into
masterfrom
fix/ui-state
Aug 10, 2026
Merged

fix: inspector dirty-tracking marks edits in equalizer/attenuator/combiner/filter drawers#60
striderZA merged 2 commits into
masterfrom
fix/ui-state

Conversation

@striderZA

@striderZA striderZA commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Summary

Inspector dirty-tracking fixes from a comprehensive codebase review (findings B2, B3).

  • B2 — project marked dirty every frame. In the ideal-mode amplifier gain block, m_param_edited = true; sat outside the if (inputDouble(...)) change check, so merely selecting an amplifier marked the project dirty every frame — spurious title-bar * and an Unsaved-Changes prompt with zero edits. Moved inside the change branch.
  • B3 — silent edit loss. The equalizer (mode combo, S-param browse, ref gain/freq/slope), ideal-filter (mode combo, S-param browse), attenuator (attenuation, S-param mode, S-param file), and combiner (S-parameter mode, S-param file) drawers mutated engine state without setting m_param_edited, so onParamChange()/markDirty() never fired — a user could edit those components and New/Open/Exit with no save prompt. Every state-mutating control now sets m_param_edited = true inside its change branch, matching the established amplifier/NF pattern.

Verification

  • Full build green; tests.exe 216 test cases / 65530 assertions, all pass (UI-logic change, no behavior in unit-visible paths).
  • No API changes — this branch keeps the pre-rename sParamMode/setSParamFile names (the rename is in refactor/engine-unification).

Notes for merging (verified by test-merging all 6 branches in order)

  • Expected content conflict with refactor/engine-unification in app/src/inspector_panel.cpp — two blocks (attenuator + combiner drawers): this branch has engine.setSParamFile(path_buf); m_param_edited = true;, that branch renames to engine.setSParamFilepath(path_buf);. Resolution is additive: engine.setSParamFilepath(path_buf); m_param_edited = true; (keep the rename from that branch, keep this branch's dirty-tracking). Merge refactor/engine-unification first, then this branch resolves trivially.
  • Everything else merges clean (verified: fix/crash-and-containmentci/run-tests-on-prrefactor/engine-unificationfix/dsp-accuracy → this → refactor/cleanup).

RF Simulator Bot and others added 2 commits August 10, 2026 07:37
…biner/filter drawers

B2: m_param_edited was set OUTSIDE the gain-change if in the ideal-mode amplifier block, so merely selecting an amplifier marked the project dirty every frame (spurious '*' and Unsaved-Changes prompt with zero edits). Move it inside the change branch.
B3: the equalizer (mode combo, S-param browse, ref gain/freq/slope), ideal-filter (mode combo, S-param browse), attenuator (atten, S-param mode, S-param file), and combiner (S-parameter mode, S-param file) drawers mutated engine state without setting m_param_edited, so onParamChange()/markDirty() never fired and edits were silently lost on New/Open/Exit without a save prompt. Set m_param_edited=true inside every state-mutating control, matching the amplifier/NF pattern.
…eep renamed setSParamFilepath + dirty-tracking)
@striderZA
striderZA merged commit 3f291e3 into master Aug 10, 2026
@striderZA
striderZA deleted the fix/ui-state branch August 10, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant