{
// save transparency for restore on Cancel
originalTransparency = fr.getTransparency();
- int originalTransparencyAsPercent = (int) (originalTransparency * 100);
- transparency.setMaximum(100 - originalTransparencyAsPercent);
+
+ updateTransparencySliderFromFR();
originalFilters = new HashMap<>(fr.getFeatureFilters()); // shallow copy
originalViewStyle = new ViewStyle(af.viewport.getViewStyle());
}
+
+ private void updateTransparencySliderFromFR()
+ {
+ boolean incon = inConstruction;
+ inConstruction = true;
+
+ int transparencyAsPercent = (int) (fr.getTransparency() * 100);
+ transparency.setValue(100 - transparencyAsPercent);
+ inConstruction = incon;
+ }
/**
* Constructor
*
{
this.af = alignFrame;
fr = af.getFeatureRenderer();
+
storeOriginalSettings();
+
try
{
jbInit();
public void actionPerformed(ActionEvent e)
{
revert();
+ refreshDisplay();
if (!hasComplement)
{
close();
fr.setFeatureFilters(originalFilters);
updateFeatureRenderer(originalData);
af.getViewport().setViewStyle(originalViewStyle);
+ updateTransparencySliderFromFR();
updateComplementButtons();
refreshDisplay();
}