File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -169,11 +169,27 @@ void ImGuiUI::onImGuiDisplay()
169169
170170 if (ImGui::BeginPopup (" menu_filter_mode" ))
171171 {
172+ bool _isSomeModesUnsupported = false ;
173+
172174 ImGui::SeparatorText (" Filter Mode" );
173175 if (ImGui::MenuItem (" Low pass" )) { _triggerParamUpdate (pFilterMode, ui->_pi2f (FMODE_LOW, FMODE_MAX)); }
176+ switch (ui->_pf2i (ui->fKnobFilterType ->getValue (), FTYPE_MAX))
177+ {
178+ case FTYPE_DIRTY:
179+ case FTYPE_MOOG2:
180+ case FTYPE_CH12DB:
181+ case FTYPE_8580:
182+ break ;
183+ default :
184+ ImGui::BeginDisabled ();
185+ _isSomeModesUnsupported = true ;
186+ }
174187 if (ImGui::MenuItem (" Band pass" )) { _triggerParamUpdate (pFilterMode, ui->_pi2f (FMODE_BAND, FMODE_MAX)); }
175188 if (ImGui::MenuItem (" High pass" )) { _triggerParamUpdate (pFilterMode, ui->_pi2f (FMODE_HIGH, FMODE_MAX)); }
176189 if (ImGui::MenuItem (" Notch" )) { _triggerParamUpdate (pFilterMode, ui->_pi2f (FMODE_NOTCH, FMODE_MAX)); }
190+
191+ if (_isSomeModesUnsupported)
192+ ImGui::EndDisabled ();
177193 ImGui::EndPopup ();
178194 }
179195
You can’t perform that action at this time.
0 commit comments