提交 c2046112 编写于 作者: M Mathieu Bastian

Fix #1373

上级 66c5f001
......@@ -55,6 +55,7 @@ import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
import javax.xml.stream.events.XMLEvent;
import org.gephi.graph.api.GraphController;
import org.gephi.graph.api.GraphModel;
import org.gephi.layout.api.LayoutModel;
import org.gephi.layout.spi.Layout;
import org.gephi.layout.spi.LayoutBuilder;
......@@ -79,7 +80,7 @@ public class LayoutModelImpl implements LayoutModel {
private final Map<LayoutPropertyKey, Object> savedProperties;
private Layout selectedLayout;
private LayoutBuilder selectedBuilder;
private Workspace workspace;
private final Workspace workspace;
//Util
private final LongTaskExecutor executor;
......@@ -116,6 +117,9 @@ public class LayoutModelImpl implements LayoutModel {
@Override
public Layout getLayout(LayoutBuilder layoutBuilder) {
Layout layout = layoutBuilder.buildLayout();
GraphController graphController = Lookup.getDefault().lookup(GraphController.class);
GraphModel graphModel = graphController.getGraphModel(workspace);
layout.setGraphModel(graphModel);
selectedBuilder = layoutBuilder;
layout.resetPropertiesValues();
return layout;
......
Manifest-Version: 1.0
AutoUpdate-Essential-Module: true
OpenIDE-Module-Localizing-Bundle: org/gephi/layout/api/Bundle.properties
OpenIDE-Module-Specification-Version: ${gephi.modules.specification.version}
OpenIDE-Module-Specification-Version: 0.9.1.1
OpenIDE-Module-Display-Category: Gephi Core
OpenIDE-Module-Name: Layout API
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册