fix: inspector dirty-tracking marks edits in equalizer/attenuator/combiner/filter drawers - #60
Merged
Conversation
…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)
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.
Summary
Inspector dirty-tracking fixes from a comprehensive codebase review (findings B2, B3).
m_param_edited = true;sat outside theif (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.m_param_edited, soonParamChange()/markDirty()never fired — a user could edit those components and New/Open/Exit with no save prompt. Every state-mutating control now setsm_param_edited = trueinside its change branch, matching the established amplifier/NF pattern.Verification
tests.exe216 test cases / 65530 assertions, all pass (UI-logic change, no behavior in unit-visible paths).sParamMode/setSParamFilenames (the rename is inrefactor/engine-unification).Notes for merging (verified by test-merging all 6 branches in order)
refactor/engine-unificationinapp/src/inspector_panel.cpp— two blocks (attenuator + combiner drawers): this branch hasengine.setSParamFile(path_buf); m_param_edited = true;, that branch renames toengine.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). Mergerefactor/engine-unificationfirst, then this branch resolves trivially.fix/crash-and-containment→ci/run-tests-on-pr→refactor/engine-unification→fix/dsp-accuracy→ this →refactor/cleanup).