Browse Source

Bugfix: Release the old editors lock

Andreas Mülder 14 years ago
parent
commit
78ba4e6319

+ 6 - 1
plugins/org.yakindu.sct.simulation.ui/src/org/yakindu/sct/simulation/ui/model/presenter/SCTSourceDisplay.java

@@ -68,9 +68,14 @@ public class SCTSourceDisplay extends SimulationSessionListenerAdapter
 		StatechartDiagramEditor editor = openEditorAndSelectElements(
 				debugElement, page);
 
+		//Release the old editor
+		if (support.isLocked())
+			support.releaseEditor();
+		
 		support = (IHighlightingSupport) editor
 				.getAdapter(IHighlightingSupport.class);
-
+		
+		//Release the new editor
 		if (support.isLocked())
 			support.releaseEditor();