Fix: SlicingDone has a different event payload than UpdatedFiles, so we need a different handler for the updates to work
This commit is contained in:
parent
45e6385963
commit
079116fdf8
2 changed files with 7 additions and 3 deletions
|
|
@ -177,8 +177,8 @@ function DataUpdater(allViewModels) {
|
|||
new PNotify({title: gettext("Slicing done"), text: _.sprintf(gettext("Sliced %(stl)s to %(gcode)s, took %(time).2f seconds"), payload)});
|
||||
|
||||
_.each(self.allViewModels, function(viewModel) {
|
||||
if (viewModel.hasOwnProperty("onUpdatedFiles")) {
|
||||
viewModel.onUpdatedFiles(payload);
|
||||
if (viewModel.hasOwnProperty("onSlicingDone")) {
|
||||
viewModel.onSlicingDone(payload);
|
||||
}
|
||||
});
|
||||
} else if (type == "SlicingFailed") {
|
||||
|
|
|
|||
|
|
@ -318,8 +318,12 @@ function GcodeFilesViewModel(printerStateViewModel, loginStateViewModel) {
|
|||
}
|
||||
};
|
||||
|
||||
self.onSlicingDone = function(payload) {
|
||||
self.requestData();
|
||||
};
|
||||
|
||||
self.onMetadataAnalysisFinished = function(payload) {
|
||||
self.requestData();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue