Skip to content

Commit

Permalink
v2.3.1 / fixed issue #13
Browse files Browse the repository at this point in the history
  • Loading branch information
justlep committed Jan 31, 2022
1 parent 09eb582 commit 5701c11
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "LePsControllerScripts4Bitwig",
"title": "LeP's controller scripts for Bitwig",
"description": "Bitwig controller script for the Behringer BCF2000, Arturia Beatstep Pro and more",
"version": "2.2.0",
"version": "2.3.1",
"author": {
"name": "Lennart Pegel",
"email": "[email protected]",
Expand Down
23 changes: 13 additions & 10 deletions src/lep-framework/view/SelectedTrackView.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ lep.SelectedTrackView = function(opts) {
var _opts = opts || {},
_numSends = _opts.numSends || 0,
_numScenes = _opts.numScenes || 0,
_id = this.name;
_id = this.name,
self = this;

lep.util.assertNumberInRange(_numSends, 0, 50, 'Invalid numSends for {}: {}', this.name, _numSends);
lep.util.assertNumberInRange(_numScenes, 0, 50, 'Invalid numScenes for {}: {}', this.name, _numScenes);
Expand All @@ -28,20 +29,22 @@ lep.SelectedTrackView = function(opts) {

var _cursorTrack = host.createCursorTrack(_id, this.name, _numSends, _numScenes, false),
_settableIsPinned = _cursorTrack.isPinned(),
_syncChannel = function() {
_cursorTrack.selectChannel(lep.SelectedTrackView._autoFollowingCursorTrack);
},
_syncOrNOP = _syncChannel;
_isTrackAlreadySelected = false;

_cursorTrack.addIsSelectedInEditorObserver(function(isSelected) {
_isTrackAlreadySelected = isSelected;
});

lep.SelectedTrackView._autoFollowingCursorTrack.name().addValueObserver(function(trackName) {
// lep.logWarn('Track of {} is now {}', self.name, trackName);
_syncOrNOP();
});

if (trackName && !_isTrackAlreadySelected && !self.locked()) {
_cursorTrack.selectChannel(lep.SelectedTrackView._autoFollowingCursorTrack);
}
});

this.locked = ko.computed({
read: ko.observable(false).updatedByBitwigValue(_settableIsPinned),
write: function(doLock) {
_syncOrNOP = doLock ? lep.util.NOP : _syncChannel;
_settableIsPinned.set(!!doLock);
}
}).extend({toggleable: true});
Expand Down Expand Up @@ -69,4 +72,4 @@ lep.SelectedTrackView._autoFollowingCursorTrack = null;
* @type {lep.SelectedTrackView[]}
* @private
*/
lep.SelectedTrackView._instances = [];
lep.SelectedTrackView._instances = [];
Binary file not shown.
4 changes: 4 additions & 0 deletions stable-version-for-download/history.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

v2.3.1 (31-Jan-2022)
- fixed issue #13
(the track name field lost focus after first keystroke when renaming a track in a saved+reopened project)

v2.3.0 (22-Apr-2018)
- added Behringer X-Touch Compact
- BCF2000: added MultiSends mode; Params lockable to device
Expand Down

0 comments on commit 5701c11

Please sign in to comment.