BStandardDialog dlg = new BStandardDialog("", UIUtilities.breakString(Translate.text("optimizeMeshTitle")), BStandardDialog.QUESTION);
String options[] = new String [] {Translate.text("button.ok"), Translate.text("button.cancel")};
if (dlg.showOptionDialog(this, options, options[0]) == 1)
return;
TriangleMesh theMesh = (TriangleMesh) objInfo.getObject();
setUndoRecord(new UndoRecord(this, false, UndoRecord.COPY_OBJECT, new Object [] {theMesh, theMesh.duplicate()}));
theMesh.copyObject(TriangleMesh.optimizeMesh(theMesh));
setMesh(theMesh);
for (int i = 0; i < selected.length; i++)
selected[i] = false;
setSelection(selected);