diff options
-rw-r--r-- | smartdashboard/src/edu/wpi/first/smartdashboard/livewindow/elements/LWSubsystem.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/smartdashboard/src/edu/wpi/first/smartdashboard/livewindow/elements/LWSubsystem.java b/smartdashboard/src/edu/wpi/first/smartdashboard/livewindow/elements/LWSubsystem.java index a42226c..d1d8ea0 100644 --- a/smartdashboard/src/edu/wpi/first/smartdashboard/livewindow/elements/LWSubsystem.java +++ b/smartdashboard/src/edu/wpi/first/smartdashboard/livewindow/elements/LWSubsystem.java @@ -76,6 +76,11 @@ public class LWSubsystem extends AbstractTableWidget { }
private void addSubsystemElement(String key, ITable value) {
+ // don't add duplicate widgets
+ for (Widget widget : widgets) {
+ if (widget != null && widget.getFieldName().equals(key))
+ return;
+ }
try {
System.out.println("\nSubsystem \"" + getFieldName() + "\" does not contain widget \"" + key + "\"");
System.out.println("Table: " + value);
|