make onMixersChanged async so that it can await internally
This commit is contained in:
parent
794d131a3e
commit
cbbfebddc9
|
|
@ -478,10 +478,10 @@
|
|||
});
|
||||
|
||||
if (deferred) {
|
||||
logger.log(
|
||||
/** logger.log(
|
||||
"[asyncJamClient] Message received via QWebChannel: " +
|
||||
message
|
||||
);
|
||||
);*/
|
||||
deferred.resolve(response);
|
||||
//remove this deferred object from queue
|
||||
deferredQueue = deferredQueue.filter(
|
||||
|
|
@ -556,11 +556,13 @@
|
|||
|
||||
let deferred = new Deferred(appMessage.request_id);
|
||||
|
||||
/**
|
||||
logger.log(
|
||||
"[asyncJamClient] diverting to backend:",
|
||||
prop,
|
||||
appMessage
|
||||
);
|
||||
*/
|
||||
|
||||
if (jkfrontendchannel) {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ ConfigureTracksStore = @ConfigureTracksStore
|
|||
const $select = $root.find('.instrument-pick');
|
||||
|
||||
const instrumentId = $select.val();
|
||||
await ConfigureTracksActions.associateInstrumentWithTrack(instrumentId);
|
||||
ConfigureTracksActions.associateInstrumentWithTrack.trigger(instrumentId);
|
||||
}`
|
||||
|
||||
|
||||
|
|
@ -465,4 +465,4 @@ ConfigureTracksStore = @ConfigureTracksStore
|
|||
|
||||
@setState({midiInterface: midiInterface})
|
||||
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -51,10 +51,16 @@ void removeSearchPath(int typeId, QString pathToRemove);
|
|||
editingTrackValid: () ->
|
||||
true
|
||||
|
||||
onMixersChanged: (mixers) ->
|
||||
@loadChannels()
|
||||
@loadTrackInstruments()
|
||||
@changed()
|
||||
#onMixersChanged: (mixers) ->
|
||||
# await @loadChannels()
|
||||
# await @loadTrackInstruments()
|
||||
# @changed()
|
||||
|
||||
onMixersChanged: `async function(mixers) {
|
||||
await this.loadChannels();
|
||||
await this.loadTrackInstruments();
|
||||
this.changed();
|
||||
}`
|
||||
|
||||
onPlatformChanged: (platform) ->
|
||||
@platform = platform
|
||||
|
|
@ -610,7 +616,7 @@ void removeSearchPath(int typeId, QString pathToRemove);
|
|||
|
||||
if (this.trackNumber == null) { return; }
|
||||
|
||||
logger.debug("context.jamClient.TrackSetInstrument(trackNumber, track.instrument_id)", this.trackNumber, instrumentId);
|
||||
console.log("context.jamClient.TrackSetInstrument(trackNumber, track.instrument_id)", this.trackNumber, instrumentId);
|
||||
|
||||
let clientInstrumentId = null;
|
||||
if ((instrumentId !== null) && (instrumentId !== '')) {
|
||||
|
|
@ -622,7 +628,7 @@ void removeSearchPath(int typeId, QString pathToRemove);
|
|||
await context.jamClient.TrackSetInstrument(this.trackNumber, clientInstrumentId);
|
||||
|
||||
if (this.trackNumber === MIDI_TRACK) {
|
||||
logger.debug("checking midi track for track instrument synchronization");
|
||||
console.log("checking midi track for track instrument synchronization");
|
||||
// keep artificial midi track in sync
|
||||
const midi = this.findMidiTrack();
|
||||
if (midi != null) {
|
||||
|
|
@ -961,4 +967,4 @@ void removeSearchPath(int typeId, QString pathToRemove);
|
|||
}`
|
||||
|
||||
}
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue