Fix flash of paint without decals when switching between default and
custom appearance
This commit is contained in:
parent
f1ef2f39d0
commit
b20076f248
@ -37,7 +37,7 @@ public class AppearanceBuilder extends AbstractChangeSource {
|
|||||||
setAppearance(a);
|
setAppearance(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void resetToDefaults() {
|
private void resetToDefaults() {
|
||||||
paint = new Color(0, 0, 0);
|
paint = new Color(0, 0, 0);
|
||||||
shine = 0;
|
shine = 0;
|
||||||
offsetU = offsetV = 0;
|
offsetU = offsetV = 0;
|
||||||
@ -48,7 +48,10 @@ public class AppearanceBuilder extends AbstractChangeSource {
|
|||||||
edgeMode = EdgeMode.REPEAT;
|
edgeMode = EdgeMode.REPEAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAppearance(Appearance a) {
|
public void setAppearance(final Appearance a) {
|
||||||
|
batch(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
resetToDefaults();
|
resetToDefaults();
|
||||||
if (a != null) {
|
if (a != null) {
|
||||||
setPaint(a.getPaint());
|
setPaint(a.getPaint());
|
||||||
@ -64,6 +67,8 @@ public class AppearanceBuilder extends AbstractChangeSource {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public Appearance getAppearance() {
|
public Appearance getAppearance() {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user