mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
Status bar shows a wrong number of selected components
This commit is contained in:
@@ -3849,5 +3849,21 @@
|
|||||||
</changes>
|
</changes>
|
||||||
<url>https://github.com/bancika/diy-layout-creator/releases</url>
|
<url>https://github.com/bancika/diy-layout-creator/releases</url>
|
||||||
</org.diylc.appframework.update.Version>
|
</org.diylc.appframework.update.Version>
|
||||||
|
<org.diylc.appframework.update.Version>
|
||||||
|
<versionNumber>
|
||||||
|
<major>4</major>
|
||||||
|
<minor>25</minor>
|
||||||
|
<build>0</build>
|
||||||
|
</versionNumber>
|
||||||
|
<releaseDate>2022-06-05 00:00:00.000 CET</releaseDate>
|
||||||
|
<name></name>
|
||||||
|
<changes>
|
||||||
|
<org.diylc.appframework.update.Change>
|
||||||
|
<changeType>BUG_FIX</changeType>
|
||||||
|
<description>Status bar shows a wrong number of selected components</description>
|
||||||
|
</org.diylc.appframework.update.Change>
|
||||||
|
</changes>
|
||||||
|
<url>https://github.com/bancika/diy-layout-creator/releases</url>
|
||||||
|
</org.diylc.appframework.update.Version>
|
||||||
</a>
|
</a>
|
||||||
</java.util.Arrays_-ArrayList>
|
</java.util.Arrays_-ArrayList>
|
||||||
|
|||||||
@@ -107,6 +107,7 @@ public class StatusBar extends JPanel implements IPlugIn {
|
|||||||
|
|
||||||
public static String UPDATE_URL = "http://diy-fever.com/diylc/api/v1/update.xml";
|
public static String UPDATE_URL = "http://diy-fever.com/diylc/api/v1/update.xml";
|
||||||
private static final Format sizeFormat = new DecimalFormat("0.##");
|
private static final Format sizeFormat = new DecimalFormat("0.##");
|
||||||
|
private static final int MAX_SELECTED_COMPONENTS = 15;
|
||||||
|
|
||||||
private JComboBox zoomBox;
|
private JComboBox zoomBox;
|
||||||
private UpdateLabel updateLabel;
|
private UpdateLabel updateLabel;
|
||||||
@@ -531,9 +532,9 @@ public class StatusBar extends JPanel implements IPlugIn {
|
|||||||
} else if (selectedComponentNames != null && !selectedComponentNames.isEmpty()) {
|
} else if (selectedComponentNames != null && !selectedComponentNames.isEmpty()) {
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
builder.append(Utils.toCommaString(selectedComponentNames.subList(0,
|
builder.append(Utils.toCommaString(selectedComponentNames.subList(0,
|
||||||
Math.min(20, selectedComponentNames.size()))));
|
Math.min(MAX_SELECTED_COMPONENTS, selectedComponentNames.size()))));
|
||||||
if (selectedComponentNames.size() > 15) {
|
if (selectedComponentNames.size() > MAX_SELECTED_COMPONENTS) {
|
||||||
builder.append(" and " + (selectedComponentNames.size() - 15) + " more");
|
builder.append(" and " + (selectedComponentNames.size() - MAX_SELECTED_COMPONENTS) + " more");
|
||||||
}
|
}
|
||||||
if (!stuckComponentNames.isEmpty()) {
|
if (!stuckComponentNames.isEmpty()) {
|
||||||
builder.append(" (" + String.format(HOLD_TO_UNSTUCK, "<b>Ctrl</b>") + " ");
|
builder.append(" (" + String.format(HOLD_TO_UNSTUCK, "<b>Ctrl</b>") + " ");
|
||||||
|
|||||||
Reference in New Issue
Block a user