mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
keep defaults for variants separate
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -125,9 +125,11 @@ public class ComponentButtonFactory {
|
||||
plugInPort.setNewComponentTypeSlot(componentType, template);
|
||||
}
|
||||
});
|
||||
|
||||
String defaultVariant = plugInPort.getDefaultTemplate(componentType.getCategory(), componentType.getName());
|
||||
|
||||
JLabel label = new JLabel(template.isDefaultFlag() ? IconLoader.PinGreen.getIcon() : IconLoader.PinGrey.getIcon());
|
||||
label.setToolTipText(template.isDefaultFlag() ? "Remove default variant" : "Set default variant");
|
||||
JLabel label = new JLabel(template.getName().equals(defaultVariant) ? IconLoader.PinGreen.getIcon() : IconLoader.PinGrey.getIcon());
|
||||
label.setToolTipText(template.getName().equals(defaultVariant) ? "Remove default variant" : "Set default variant");
|
||||
label.addMouseListener(new MouseAdapter() {
|
||||
|
||||
@Override
|
||||
@@ -138,8 +140,7 @@ public class ComponentButtonFactory {
|
||||
JPopupMenu m = (JPopupMenu) c;
|
||||
m.setVisible(false);
|
||||
}
|
||||
plugInPort.setTemplateDefault(componentType.getCategory(), componentType.getName(), template.getName(),
|
||||
!template.isDefaultFlag());
|
||||
plugInPort.setTemplateDefault(componentType.getCategory(), componentType.getName(), template.getName());
|
||||
e.consume();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -2104,7 +2104,7 @@
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>NEW_FEATURE</changeType>
|
||||
<description>Made it possible for DIYLC to come with predefined component variants in addition to user-specific variants</description>
|
||||
<description>DIYLC now comes with predefined component variants out-of-the box, in addition to user-specific variants</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>BUG_FIX</changeType>
|
||||
@@ -2113,6 +2113,10 @@
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>BUG_FIX</changeType>
|
||||
<description>Inlude Themes (under Config menu) in the Windows installer version</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>BUG_FIX</changeType>
|
||||
<description>Covered humbucker pickup throwing errors when rotated</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
</changes>
|
||||
<url>https://github.com/bancika/diy-layout-creator/releases</url>
|
||||
|
||||
Reference in New Issue
Block a user