remote control: restore /TABS command

This commit is contained in:
jean-emmanuel 2021-02-11 07:52:47 +01:00
parent 6046715f68
commit c1feb5f628
3 changed files with 23 additions and 3 deletions

View file

@ -5,6 +5,9 @@
- midi
- add active sensing messages support
- remote control
- restore `/TABS` command (for opening tabs by ids)
## 1.8.6
- bug fixes

View file

@ -198,3 +198,9 @@ Open session file `path.json`.
#### `/SESSION/SAVE path.json`
Save current session to `path.json`. If `path.json` is omitted, current session's path is used.
----
#### `/TABS tab_id1 tab_id2 ...`
Open the tabs designated by the id parameters.

View file

@ -259,10 +259,21 @@ var callbacks = {
sessionManager.save(args[0])
},
'/TABS': function(args) {
if (!Array.isArray(args)) args = [args]
for (let id of args) {
let ws = widgetManager.getWidgetById(id)
for (let w of ws) {
if (w.getProp('type') === 'tab') {
var index = w.parent.children.indexOf(w)
w.parent.setValue(index, {sync: true, send: false})
}
}
}
}
}
module.exports = {