commit 2a1b38e6d862934bf86d34b9bd10d5427ea16e11 parent e09315b80f4fcd9d35b4aa63fe58a5bcd5316372 Author: root <[email protected]> Date: Fri, 21 Apr 2023 18:39:03 +0100 Part.cpp: Add kit management to C_resonance_bandwidth Set C_resonance_bandwidth for each item in a kit, in the same manner as C_resonance_center. Diffstat:
M | src/Misc/Part.cpp | | | 9 | +++++++-- |
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/Misc/Part.cpp b/src/Misc/Part.cpp @@ -847,8 +847,13 @@ void Part::SetController(unsigned int type, int par) break; case C_resonance_bandwidth: ctl.setresonancebw(par); - kit[0].adpars->GlobalPar.Reson-> - sendcontroller(C_resonance_bandwidth, ctl.resonancebandwidth.relbw); + for(int item = 0; item < NUM_KIT_ITEMS; ++item) { + if(kit[item].adpars == NULL) + continue; + kit[item].adpars->GlobalPar.Reson-> + sendcontroller(C_resonance_bandwidth, + ctl.resonancebandwidth.relbw); + } break; } }