Skip to content

Commit f3f5fa8

Browse files
committed
Ignoring my own projectDocument:updated event
1 parent ba84dda commit f3f5fa8

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

services/static-webserver/client/source/class/osparc/data/model/StudyUI.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -296,13 +296,11 @@ qx.Class.define("osparc.data.model.StudyUI", {
296296
const currentStudy = osparc.store.Store.getInstance().getCurrentStudy();
297297
if (currentStudy) {
298298
const node = currentStudy.getWorkbench().getNode(nodeId);
299-
if (op === "replace") {
300-
if (path.includes("/position")) {
301-
this.__updateNodePositionFromPatch(node, op, path, value);
302-
}
303-
if (path.includes("/marker")) {
304-
this.__updateNodeMarkerFromPatch(node, op, path, value);
305-
}
299+
if (path.includes("/position")) {
300+
this.__updateNodePositionFromPatch(node, op, path, value);
301+
}
302+
if (path.includes("/marker")) {
303+
this.__updateNodeMarkerFromPatch(node, op, path, value);
306304
}
307305
}
308306
}

services/static-webserver/client/source/class/osparc/desktop/StudyEditor.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,12 @@ qx.Class.define("osparc.desktop.StudyEditor", {
332332
if (!socket.slotExists("projectDocument:updated")) {
333333
socket.on("projectDocument:updated", data => {
334334
if (data["projectId"] === this.getStudy().getUuid()) {
335+
if (data["userPrimaryGid"] === osparc.auth.Data.getInstance().getGroupId()) {
336+
// ignore my own updates
337+
console.debug("Ignoring my own projectDocument:updated event", data);
338+
return;
339+
}
340+
335341
const updatedStudy = data["document"];
336342
// curate projectDocument:updated document
337343
this.self().curateBackendProjectDocument(updatedStudy);

0 commit comments

Comments
 (0)