mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
fixed npe
This commit is contained in:
+4
-1
@@ -199,8 +199,11 @@ public class StatusBar extends JPanel implements IPlugIn {
|
||||
break;
|
||||
case SELECTION_SIZE_CHANGED:
|
||||
Point2D size = (Point2D) params[0];
|
||||
boolean isMetric = (Boolean) ConfigurationManager.getInstance().getConfigurationItem(
|
||||
Boolean isMetric = (Boolean) ConfigurationManager.getInstance().getConfigurationItem(
|
||||
Presenter.METRIC_KEY);
|
||||
if (isMetric == null) {
|
||||
isMetric = true;
|
||||
}
|
||||
if (size == null) {
|
||||
getSizeLabel().setText("N/A");
|
||||
} else {
|
||||
|
||||
+4
-1
@@ -752,8 +752,11 @@ public class Presenter implements IPlugInPort {
|
||||
if (selectedComponents.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
boolean isMetric = (Boolean) ConfigurationManager.getInstance().getConfigurationItem(
|
||||
Boolean isMetric = (Boolean) ConfigurationManager.getInstance().getConfigurationItem(
|
||||
METRIC_KEY);
|
||||
if (isMetric == null) {
|
||||
isMetric = true;
|
||||
}
|
||||
Area area = new Area();
|
||||
for (IDIYComponent<?> component : selectedComponents) {
|
||||
Area componentArea = componentAreaMap.get(component);
|
||||
|
||||
Reference in New Issue
Block a user