use of blue.BlueData in project blue by kunstmusik.
the class ScoreObjectEditorTopComponent method resultChanged.
@Override
public void resultChanged(LookupEvent ev) {
if (!(TopComponent.getRegistry().getActivated() instanceof SoundObjectProvider)) {
return;
}
Collection<? extends ScoreObject> scoreObjects = result.allInstances();
if (scoreObjects.size() == 1) {
SwingUtilities.invokeLater(() -> {
BlueData data = BlueProjectManager.getInstance().getCurrentBlueData();
ScoreObject sObj = scoreObjects.iterator().next();
if (sObj instanceof PolyObject && data.getSoundObjectLibrary().contains(sObj)) {
PolyObject pObj = (PolyObject) sObj;
ScoreController.getInstance().editLayerGroup(pObj);
editScoreObject(null);
} else {
editScoreObject(sObj);
}
});
// FIXME - figure out how to discern if editing is from BlueLive...
} else {
SwingUtilities.invokeLater(() -> {
editScoreObject(null);
});
}
}
Aggregations