fixed measure editing

fixed trace lead color
This commit is contained in:
bancika
2011-01-14 13:57:51 +00:00
parent 628d370019
commit 1f5fa8ae14
8 changed files with 44 additions and 18 deletions
@@ -151,7 +151,7 @@ public class ComponentProcessor {
* @return
*/
public List<PropertyWrapper> getMutualSelectionProperties(
List<IDIYComponent<?>> selectedComponents) {
List<IDIYComponent<?>> selectedComponents) throws Exception {
if (selectedComponents.isEmpty()) {
return null;
}
@@ -160,23 +160,13 @@ public class ComponentProcessor {
properties.addAll(extractProperties(firstComponent.getClass()));
// Initialize values
for (PropertyWrapper property : properties) {
try {
property.readFrom(firstComponent);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
property.readFrom(firstComponent);
}
for (int i = 1; i < selectedComponents.size(); i++) {
IDIYComponent<?> component = selectedComponents.get(i);
List<PropertyWrapper> newProperties = extractProperties(component.getClass());
for (PropertyWrapper property : newProperties) {
try {
property.readFrom(component);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
property.readFrom(component);
}
properties.retainAll(newProperties);
// for (PropertyWrapper property : properties) {
@@ -973,7 +973,13 @@ public class Presenter implements IPlugInPort {
@Override
public List<PropertyWrapper> getMutualSelectionProperties() {
return ComponentProcessor.getInstance().getMutualSelectionProperties(selectedComponents);
try {
return ComponentProcessor.getInstance()
.getMutualSelectionProperties(selectedComponents);
} catch (Exception e) {
LOG.error("Could not get mutual selection properties", e);
return null;
}
}
@Override