}
if (chooser.showSaveDialog(rootPanel) == JFileChooser.APPROVE_OPTION) {
File file = chooser.getSelectedFile();
RGBPalette gradient = layer.getPalette().makeCopy();
gradient.setFlam3Name(file.getName());
new MapGradientWriter().writeGradient(gradient, file.getAbsolutePath());
tinaController.showStatusMessage(gradient, "gradient saved to disc");
}
}
}
catch (Throwable ex) {