Permalink
Browse files

Do not execute an empty edit

Solves bug 2034
  • Loading branch information...
1 parent dfd25b9 commit 0dc48c469b014c7bf8c766f8867503bc722137a6 Arvid Berg committed Jun 30, 2010
@@ -760,8 +760,10 @@ public void removeExplicitHydrogens() {
atomsToRemove.add( RemoveAtom.remove( atom) );
}
}
- relay.execute( CompositEdit.compose( atomsToRemove ) );
- updateView();
+ if(!atomsToRemove.isEmpty()) {
+ relay.execute( CompositEdit.compose( atomsToRemove ) );
+ updateView();
+ }
} else {
say("No opened JChemPaint editor");
}

0 comments on commit 0dc48c4

Please sign in to comment.