User aec227c3cb
22-01-2014 21:40:34
I am using the MViewPane to show structures and have it set to open the MSketcherPane on double-click. When a user closes the sketcher, I want to expand all groups when they're displayed in the view pane.
This is the code (MarvinSketch 6.0.1_b94)
public void propertyChange(PropertyChangeEvent evt) {
MDocument doc = (MDocument) evt.getNewValue();
for (Molecule molecule : doc.getAllNonEmptyMolecules()) {
molecule.expandSgroups();
}
}
From sketcher:
After executing above code, in view:
If you expand in the sketcher using Structure -> Group -> Expand Groups it works as expected:
Is my code wrong or could this be a bug?