@@ -116,14 +116,15 @@ void CurrentFxDisplay::defaultLayout()
116116 }
117117 };
118118
119- // First the FX Selector, type, preset, and jog.
119+ // Start placing the various components.
120+ layoutJogFx ();
120121 layoutFxSelector ();
121- // This one's a little weird: the construction is done in layoutComponentForSkin.
122- makeParameter (fx_type);
123122 layoutFxPresetLabel ();
124- layoutJogFx ();
123+ // FX menu. This one's a little weird: the construction is done in
124+ // layoutComponentForSkin.
125+ makeParameter (fx_type);
125126
126- // Now the FX params .
127+ // Now the actual FX labels and parameter .
127128 if (effect_)
128129 {
129130 for (i = 0 ; i < n_fx_params; i++)
@@ -146,14 +147,20 @@ void CurrentFxDisplay::defaultLayout()
146147 labels_[i]->setSkin (currentSkin, editor_->bitmapStore );
147148 labels_[i]->setLabel (label);
148149
149- editor_->addAndMakeVisibleWithTracking (this , *labels_[i]);
150+ // This looks weird: we're putting the label into the editor's
151+ // MainFrame instead of our own component? That's because if we
152+ // put it in ours, it messes with Surge's tab-focus ordering for
153+ // accessibility. It was originally placed in the main frame
154+ // before we moved everything to its own component, so keep
155+ // doing that.
156+ editor_->addAndMakeVisibleWithTracking (editor_->frame .get (), *labels_[i]);
150157 }
151158 else
152159 {
153160 labels_[i].reset (nullptr );
154161 }
155162
156- // Now the FX proper .
163+ // Finally the FX parameters themselves .
157164 if (fx.p [i].ctrltype != ct_none)
158165 {
159166 makeParameter (paramToParamIndex[i]);
@@ -239,8 +246,7 @@ void CurrentFxDisplay::layoutFxSelector()
239246 editor_->effectChooser ->setDeactivatedBitmask (
240247 editor_->synth ->storage .getPatch ().fx_disable .val .i );
241248
242- editor_->addAndMakeVisibleWithTracking (editor_->frame ->getControlGroupLayer (cg_FX),
243- *editor_->effectChooser );
249+ editor_->addAndMakeVisibleWithTracking (this , *editor_->effectChooser );
244250
245251 editor_->setAccessibilityInformationByTitleAndAction (editor_->effectChooser ->asJuceComponent (),
246252 " FX Slots" , " Select" );
0 commit comments