From e87f0965679502de281692c298d66a7ae9507bd8 Mon Sep 17 00:00:00 2001 From: Tuukka Lehtonen Date: Tue, 25 Oct 2016 08:50:09 +0300 Subject: [PATCH] Sync git svn branch with SVN repository r33359. refs #6786 --- .../simantics/structural/synchronization/Synchronizer.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bundles/org.simantics.structural.synchronization.client/src/org/simantics/structural/synchronization/Synchronizer.java b/bundles/org.simantics.structural.synchronization.client/src/org/simantics/structural/synchronization/Synchronizer.java index 7412c6ccf..d2738d844 100644 --- a/bundles/org.simantics.structural.synchronization.client/src/org/simantics/structural/synchronization/Synchronizer.java +++ b/bundles/org.simantics.structural.synchronization.client/src/org/simantics/structural/synchronization/Synchronizer.java @@ -12,6 +12,7 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.common.procedure.adapter.TransientCacheAsyncListener; +import org.simantics.db.exception.CancelTransactionException; import org.simantics.db.exception.DatabaseException; import org.simantics.db.layer0.exception.MissingVariableValueException; import org.simantics.db.layer0.request.ResourceToPossibleVariable; @@ -228,7 +229,7 @@ public class Synchronizer { } if(changeFlags == null) { - // Full synchronization, synchronize all childre + // Full synchronization, synchronize all children if(children.size() > 0) { double proportionOfWorkForChildren = proportionOfWork / children.size(); for(Variable child : children) @@ -236,6 +237,9 @@ public class Synchronizer { } else { didWork(proportionOfWork); + // Full synchronization is cancelable + if(monitor != null && monitor.isCanceled()) + throw new CancelTransactionException(); } } else { -- 2.43.2