Skip to content

Commit 0c02a88

Browse files
Fix mapping activation in view mode (#8687)
Don't wait for differ response if there are no tracings, for example in view mode. ### URL of deployed dev instance (used for testing): - https://fixmappingactivationviewmode.webknossos.xyz ### Steps to test: - Open a dataset in view mode and activate a mapping. Previously, the mapping activation was stuck and the mapping never got activated. - Follow the testing instructions in #8676 to check that the race condition is still fixed ------ (Please delete unneeded items, merge only when none are left open) - [x] Updated [changelog](../blob/master/CHANGELOG.unreleased.md#unreleased) - [x] Removed dev-only changes like prints and application.conf edits - [x] Considered [common edge cases](../blob/master/.github/common_edge_cases.md) --------- Co-authored-by: Philipp Otto <philipp.4096@gmail.com>
1 parent 723a5dc commit 0c02a88

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.unreleased.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
1919
### Fixed
2020
- Improved efficiency of saving bounding box related changes. [#8492](https://github.com/scalableminds/webknossos/pull/8492)
2121
- When deleting a dataset, its caches are cleared, so that if a new dataset by the same name is uploaded afterwards, only new data is loaded. [#8638](https://github.com/scalableminds/webknossos/pull/8638)
22+
- Fixed a race condition when starting proofreading with a split action. [#8676](https://github.com/scalableminds/webknossos/pull/8676)
23+
- Fixed that activating a mapping got stuck when a dataset was opened in "view" mode. [#8687](https://github.com/scalableminds/webknossos/pull/8687)
2224

2325
### Removed
2426

frontend/javascripts/viewer/model.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,10 @@ export class WebKnossosModel {
370370
}
371371
}
372372

373-
Store.dispatch(ensureTracingsWereDiffedToSaveQueueAction(callback));
374-
await deferred.promise();
373+
if (tracingIds.size > 0) {
374+
Store.dispatch(ensureTracingsWereDiffedToSaveQueueAction(callback));
375+
await deferred.promise();
376+
}
375377
return true;
376378
}
377379

0 commit comments

Comments
 (0)