From: JaniSimomaa Date: Thu, 11 Jul 2019 09:44:11 +0000 (+0300) Subject: Prevent DistrictDiagramEditor from disposing to save load time X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=9f6c68f86b52fac94cacb8f8c1e58d17e382830e;p=simantics%2Fdistrict.git Prevent DistrictDiagramEditor from disposing to save load time gitlab #55 Change-Id: I389045f81545e1f056b060b4560f0df5d3e70543 --- diff --git a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/DistrictDiagramEditor.java b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/DistrictDiagramEditor.java index 9862cde2..7805ea1b 100644 --- a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/DistrictDiagramEditor.java +++ b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/DistrictDiagramEditor.java @@ -1,5 +1,6 @@ package org.simantics.district.network.ui; +import org.eclipse.ui.IWorkbenchPartReference; import org.eclipse.ui.PartInitException; import org.simantics.modeling.ui.diagramEditor.DiagramEditor; import org.simantics.modeling.ui.diagramEditor.DiagramViewer; @@ -7,9 +8,16 @@ import org.simantics.modeling.ui.diagramEditor.DiagramViewer; public class DistrictDiagramEditor extends DiagramEditor { public static final String ID = "org.simantics.district.network.ui.diagrameditor"; - + @Override protected DiagramViewer createViewer() throws PartInitException { return new DistrictDiagramViewer(); } + + @Override + public void partHidden(IWorkbenchPartReference partRef) { + // we do not want to have disposer for district diagram viewer + // to add disposer with default settings uncomment the following line + // super.partHidden(partRef); + } }