Visual centralized missing when adding multitude of elements AND SELECT from API

R3.3.0 Win10 x64

I would like to address a fairly common problem in the API: visual centralization of selection.

Using the API, when you add an element to a list or panel and select, such as a device, Renoise should visually centralize the selection of that element. The most common are device chains or lists.

I can check and list in this thread the known cases that work correctly and the ones that don’t:

Correct visual centralization:

  1. Select tracks (in Pattern Editor), keep focus centralized horizontally. Ok!
  2. Select track devices in Pattern Editor, bottom devices panel), keeps the focus centralized horizontally. Ok!
  3. Select sample effect device (in “Effect” tab, DSP chain list) keeps the focus centralized horizontally. Ok!
  4. Select samples (Samples box) keeps the focus centralized vertically. Ok!
  5. Select instruments (Instruments box) keeps the focus centralized vertically. Ok!
  6. Select sequence (Matrix) keeps the focus centralized vertically. Ok!
  7. Select note column (in Pattern Editor) keeps the focus centralized horizontally. Ok!
  8. Select effect column (in Pattern Editor) keeps the focus centralized horizontally. Ok!
  9. Select line (in Pattern Editor) keeps the focus centralized vertically. Ok!

Incorrect visual centralization:

  1. Select sample devices (in “Modulation” tab) does not centralize visually. It should centralize horizontally. Related issue
  2. Select modulation set (in “Modulation” tab) does not centralize visually. It should centralize vertically.
  3. Select sample effect device (in “Effect” tab, bottom devices panel) does not centralize visually. It should centralize horizontally.
  4. Select effect chain (in “Effect” tab) does not centralize visually. It should centralize vertically.

Maybe there are some more. Fortunately there are not many.

In general, the properties of the selected_X_index song should be responsible for visually centralizing that selection, so that the user does not lose the visual focus of the element.
Related issue (renoise.song().selected_sample_modulation_set_device_index):