Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use isDirty on IMoleculesEditorModel to convey if the molecule is edited
  • Loading branch information
goglepox committed Feb 8, 2013
1 parent 633bbc3 commit b3b7b1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Expand Up @@ -661,12 +661,6 @@ && has2DCoordinatesNew( atomContainer )<2) {
if(GenerateLabelPrefChangedLisener.showGeneratedLabel())
add( Message.GENERATED );
}else {
IAtomContainer oldAC = atomContainer;
atomContainer = atomContainer.getBuilder()
.newInstance(IAtomContainer.class, atomContainer );
atomContainer.setProperties( new HashMap<Object, Object>(
oldAC.getProperties()) );
setDirty( oldAC.getFlag( 7 ) );
}
setAtomContainer(atomContainer);
}
Expand Down
Expand Up @@ -485,8 +485,10 @@ private void updateJCPPage() {
int index = moleculesPage.getMolTableViewer().getFirstSelected();
if(index < 0 ) index = 0;
IMoleculesEditorModel model = moleculesPage.getModel();
if(model != null)
if(model != null) {
jcpPage.setInput( model.getMoleculeAt( index ));
jcpPage.getWidget().setDirty( model.isDirty( index ) );
}
else
jcpPage.setInput( null );
// ISelection selection = moleculesPage.getSelection();
Expand Down

0 comments on commit b3b7b1d

Please sign in to comment.