remote control: restore /TABS command
This commit is contained in:
parent
6046715f68
commit
c1feb5f628
3 changed files with 23 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue