From: luukkainen Date: Thu, 22 Jan 2009 14:30:00 +0000 (+0000) Subject: git-svn-id: https://www.simantics.org/svn/simantics/3d/branches/dev@8803 ac1ea38d... X-Git-Tag: simantics-1.19.0~20^2~9 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=4d538f03ee4adbcd174ff5aa444354361c3b1fa4;p=simantics%2F3d.git git-svn-id: https://www.simantics.org/svn/simantics/3d/branches/dev@8803 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.proconf.processeditor/src/org/simantics/processeditor/adapters/ProcessEditorSelectionAdapter.java b/org.simantics.proconf.processeditor/src/org/simantics/processeditor/adapters/ProcessEditorSelectionAdapter.java index cffd0730..07f9186e 100644 --- a/org.simantics.proconf.processeditor/src/org/simantics/processeditor/adapters/ProcessEditorSelectionAdapter.java +++ b/org.simantics.proconf.processeditor/src/org/simantics/processeditor/adapters/ProcessEditorSelectionAdapter.java @@ -26,19 +26,7 @@ public class ProcessEditorSelectionAdapter extends SelectionAdapter { } } } - - public void setEditorSelection(boolean addShapes) { - List sel = getSelectedObjects(); - for (IGraphicsNode o : adapter.getNodes()) - if (o instanceof ISelectableNode) { - if (sel.contains(o)) { - ((ISelectableNode)o).setSelected(true); - } else { - ((ISelectableNode)o).setSelected(false); - } - } - } @Override protected void setEditorHighlightSelection() { diff --git a/org.simantics.proconf.processeditor/src/org/simantics/processeditor/views/ProcessEditor.java b/org.simantics.proconf.processeditor/src/org/simantics/processeditor/views/ProcessEditor.java index 699bd1e3..a53463e4 100644 --- a/org.simantics.proconf.processeditor/src/org/simantics/processeditor/views/ProcessEditor.java +++ b/org.simantics.proconf.processeditor/src/org/simantics/processeditor/views/ProcessEditor.java @@ -110,21 +110,17 @@ public class ProcessEditor extends ThreeDimensionalEditorBase { selectionAdapter.setCurrentSelection(s); viewChanged = true; - //if (s.getRootSelection() == null) { - if (!(part instanceof ProcessEditor)) { - //System.out.println("ShapeEditorView.pageSelectionChanged() no root selection"); - ((ProcessEditorSelectionAdapter)selectionAdapter).setEditorSelection(true); - return; + /* + if (part instanceof ProcessEditor) { + ProcessEditor sender = (ProcessEditor)part; + if (!sender.getPlantResource().equals(plantResource)) { + selectionAdapter.setCurrentSelection(new StructuredResourceSelection()); + selectionAdapter.setEditorSelection(); + return; + } } - //if (!s.getRootSelection().getResource().getId().equals(plant.getResource().getId())) { - ProcessEditor sender = (ProcessEditor)part; - if (!sender.getPlantResource().equals(plantResource)) { -// System.out.println("ShapeEditorView.pageSelectionChanged() not right group " -// + s.getRootSelection().getResource().getId() + " != " + model.getResource().getId()); - selectionAdapter.setCurrentSelection(new StructuredResourceSelection()); - ((ProcessEditorSelectionAdapter)selectionAdapter).setEditorSelection(false); - return; - } + */ + selectionAdapter.setEditorSelection(); }