Merge pull request #1442 from SiboVG/issue-1244
[#1244] Reset component appearance after reset to default
This commit is contained in:
commit
f194562c78
@ -432,12 +432,12 @@ public class AppearancePanel extends JPanel {
|
|||||||
BooleanModel mDefault;
|
BooleanModel mDefault;
|
||||||
if (!insideBuilder) {
|
if (!insideBuilder) {
|
||||||
builder = ab;
|
builder = ab;
|
||||||
mDefault = new BooleanModel(c.getAppearance() == null);
|
mDefault = new BooleanModel(c.getAppearance() == null || defaultAppearance.equals(c.getAppearance()));
|
||||||
}
|
}
|
||||||
else if (c instanceof InsideColorComponent) {
|
else if (c instanceof InsideColorComponent) {
|
||||||
builder = insideAb;
|
builder = insideAb;
|
||||||
mDefault = new BooleanModel(
|
Appearance appearance = ((InsideColorComponent)c).getInsideColorComponentHandler().getInsideAppearance();
|
||||||
((InsideColorComponent)c).getInsideColorComponentHandler().getInsideAppearance() == null);
|
mDefault = new BooleanModel(appearance == null || defaultAppearance.equals(appearance));
|
||||||
}
|
}
|
||||||
else return;
|
else return;
|
||||||
|
|
||||||
@ -465,6 +465,7 @@ public class AppearancePanel extends JPanel {
|
|||||||
: builder.getAppearance();
|
: builder.getAppearance();
|
||||||
}
|
}
|
||||||
builder.setAppearance(defaultAppearance);
|
builder.setAppearance(defaultAppearance);
|
||||||
|
c.setAppearance(null);
|
||||||
} else {
|
} else {
|
||||||
if (!insideBuilder)
|
if (!insideBuilder)
|
||||||
builder.setAppearance(previousUserSelectedAppearance);
|
builder.setAppearance(previousUserSelectedAppearance);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user