Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #5 from valyo/2.5.x
2.5.x Bug 3209 fix
  • Loading branch information
jonalv committed Jun 7, 2012
2 parents 7ad6787 + d7fa39f commit 77b3d57
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Expand Up @@ -170,12 +170,13 @@ public void doSave( IProgressMonitor monitor ) {
IAtomContainer container = model.getAtomContainer();
if (GeometryTools.has3DCoordinates(container) &&
GeometryTools.has2DCoordinates(container)) {
boolean agreedWithInfoLoss = MessageDialog.openQuestion(
this.getSite().getShell(),
chemFormat.getFormatName(),
"This file format cannot save 3D and 2D coordinates. " +
"Do you want to save only 2D?"
);
boolean agreedWithInfoLoss = MessageDialog.openConfirm(
this.getSite().getShell(),
"WARNING",
"When saving 2D coordinates to MDL molfile the 3D coordinates will be lost.\n\n" +
"If you want to save both 2D and 3D try another file format (e.g CML) via the \"Save as...\" menu.\n\n" +
"Click OK if you want ot save 2D coordinates?"
);
if (!agreedWithInfoLoss) return;
}

Expand Down
Expand Up @@ -338,7 +338,6 @@ public boolean hasNext() {
}

public ICDKMolecule next() {
++pos;
if ( pos % (size/100.0) == 0 ) {
synchronized ( monitor ) {
if (monitor.isCanceled()) {
Expand All @@ -349,7 +348,7 @@ public ICDKMolecule next() {
+TimeCalculator.generateTimeRemainEst(
before, pos, size ) + ")" );
}
return getMoleculeAt( pos );
return getMoleculeAt( pos++ );
}

public void remove() {
Expand Down

0 comments on commit 77b3d57

Please sign in to comment.