Improve refreshing the decal model by doing it whenever the underlying

appearance changes.  This allows for "From file" to work correctly as
well.
This commit is contained in:
kruland2607 2013-09-03 20:32:55 -05:00
parent 375f371702
commit 45ef3064fd

View File

@ -154,6 +154,7 @@ public class AppearancePanel extends JPanel {
figureColorButton.setIcon(new ColorIcon(c.getColor()));
colorButton.setIcon(new ColorIcon(ab.getPaint()));
c.setAppearance(ab.getAppearance());
decalModel.refresh();
}
});
@ -275,7 +276,6 @@ public class AppearancePanel extends JPanel {
try {
DecalImage newImage = editDecalHelper.editDecal(SwingUtilities.getWindowAncestor(AppearancePanel.this), document, c, ab.getImage());
ab.setImage(newImage);
decalModel.refresh();
} catch (EditDecalHelperException ex) {
JOptionPane.showMessageDialog(AppearancePanel.this, ex.getMessage(), "", JOptionPane.ERROR_MESSAGE);
}