File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
webknossos-datastore/app/com/scalableminds/webknossos/datastore/models/datasource Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -333,14 +333,15 @@ trait DataLayer extends DataLayerLike {
333
333
existingAttachmentsOpt match {
334
334
case None => Some (newAttachments)
335
335
case Some (existingFiles) =>
336
- val segmentIndex = newAttachments.segmentIndex.orElse(existingFiles.segmentIndex)
337
- val connectome = (newAttachments.connectomes ++ existingFiles.connectomes).distinctBy(_.path)
336
+ val segmentIndex = existingFiles.segmentIndex.orElse(newAttachments.segmentIndex)
337
+ val connectome =
338
+ if (existingFiles.connectomes.isEmpty) newAttachments.connectomes else existingFiles.connectomes
338
339
val agglomerateFiles =
339
- ( newAttachments.agglomerates ++ existingFiles.agglomerates).distinctBy(_.path)
340
+ if (existingFiles.agglomerates.isEmpty) newAttachments.agglomerates else existingFiles.agglomerates
340
341
val meshFiles =
341
- ( newAttachments.meshes ++ existingFiles.meshes).distinctBy(_.path)
342
+ if (existingFiles.meshes.isEmpty) newAttachments.meshes else existingFiles.meshes
342
343
val cumsumFile =
343
- newAttachments .cumsum.orElse(existingFiles .cumsum)
344
+ existingFiles .cumsum.orElse(newAttachments .cumsum)
344
345
345
346
Some (
346
347
DatasetLayerAttachments (
You can’t perform that action at this time.
0 commit comments