|
From: <mcu...@us...> - 2014-12-20 18:36:16
|
Revision: 1555
http://sourceforge.net/p/orm/code/1555
Author: mcurland
Date: 2014-12-20 18:36:14 +0000 (Sat, 20 Dec 2014)
Log Message:
-----------
Redo deletion of diagram with a repeated shape triggers a delete closure with no current transaction, which isn't handled by the multi shape code.
This is a hard crash. I have no idea why it wasn't caught years ago.
Modified Paths:
--------------
trunk/ORMModel/Framework/Diagrams/MultiShapeUtility.cs
Modified: trunk/ORMModel/Framework/Diagrams/MultiShapeUtility.cs
===================================================================
--- trunk/ORMModel/Framework/Diagrams/MultiShapeUtility.cs 2014-12-19 07:20:36 UTC (rev 1554)
+++ trunk/ORMModel/Framework/Diagrams/MultiShapeUtility.cs 2014-12-20 18:36:14 UTC (rev 1555)
@@ -535,12 +535,14 @@
NodeShape sourceShape;
IReconfigureableLink reconfigurableLink;
- if (walker != null)
+ Transaction currentTransaction;
+ if (walker != null &&
+ null != (currentTransaction = sourceElement.Store.TransactionManager.CurrentTransaction))
{
if (sourceRoleInfo != null &&
sourceRoleInfo.Id == PresentationViewsSubject.SubjectDomainRoleId)
{
- contextDictionary = sourceElement.Store.TransactionManager.CurrentTransaction.TopLevelTransaction.Context.ContextInfo;
+ contextDictionary = currentTransaction.TopLevelTransaction.Context.ContextInfo;
if (contextDictionary.TryGetValue(subjectsKey = DeletingSubjectsKey, out subjectsDictionaryObject))
{
deletingSubjectsDictionary = (Dictionary<ModelElement, object>)subjectsDictionaryObject;
@@ -556,7 +558,7 @@
null != (sourceShape = sourceElement as NodeShape) &&
null != (reconfigurableLink = (targetRelationship as LinkConnectsToNode).Link as IReconfigureableLink) &&
null != (primaryShape = ResolvePrimaryShape(sourceShape)) &&
- (!sourceElement.Store.TransactionManager.CurrentTransaction.TopLevelTransaction.Context.ContextInfo.TryGetValue(DeletingSubjectsKey, out subjectsDictionaryObject) ||
+ (!currentTransaction.TopLevelTransaction.Context.ContextInfo.TryGetValue(DeletingSubjectsKey, out subjectsDictionaryObject) ||
(null != (subject = primaryShape.ModelElement) &&
!((Dictionary<ModelElement, object>)subjectsDictionaryObject).ContainsKey(subject))))
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|