From 3e7b2affeb1db714aef139488d195bfd28da234b Mon Sep 17 00:00:00 2001 From: Sam Carlberg Date: Wed, 11 Oct 2017 22:10:17 -0400 Subject: [PATCH] Do not autopopulate metadata (#233) --- .../first/shuffleboard/app/components/DashboardTabPane.java | 2 ++ .../first/shuffleboard/plugin/base/layout/SubsystemLayout.java | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/edu/wpi/first/shuffleboard/app/components/DashboardTabPane.java b/app/src/main/java/edu/wpi/first/shuffleboard/app/components/DashboardTabPane.java index a22b9a6e9..ea1b35a4b 100644 --- a/app/src/main/java/edu/wpi/first/shuffleboard/app/components/DashboardTabPane.java +++ b/app/src/main/java/edu/wpi/first/shuffleboard/app/components/DashboardTabPane.java @@ -5,6 +5,7 @@ import edu.wpi.first.shuffleboard.api.sources.DataSource; import edu.wpi.first.shuffleboard.api.util.Debouncer; import edu.wpi.first.shuffleboard.api.util.FxUtils; +import edu.wpi.first.shuffleboard.api.util.NetworkTableUtils; import edu.wpi.first.shuffleboard.api.util.TypeUtils; import edu.wpi.first.shuffleboard.api.widget.Component; import edu.wpi.first.shuffleboard.api.widget.ComponentContainer; @@ -307,6 +308,7 @@ public boolean supports(DataSource source) { return !deferPopulation && isAutoPopulate() && source.getDataType() != DataTypes.Map + && !NetworkTableUtils.isMetadata(source.getId()) && (source.getName().startsWith(getSourcePrefix()) || source.getId().startsWith(getSourcePrefix())); } diff --git a/plugins/base/src/main/java/edu/wpi/first/shuffleboard/plugin/base/layout/SubsystemLayout.java b/plugins/base/src/main/java/edu/wpi/first/shuffleboard/plugin/base/layout/SubsystemLayout.java index 914b5ec66..d3cb740d8 100644 --- a/plugins/base/src/main/java/edu/wpi/first/shuffleboard/plugin/base/layout/SubsystemLayout.java +++ b/plugins/base/src/main/java/edu/wpi/first/shuffleboard/plugin/base/layout/SubsystemLayout.java @@ -109,7 +109,8 @@ public String getName() { public boolean supports(DataSource source) { return this.source != null && this.source != source - && source.getName().startsWith(getSource().getName()); + && source.getName().startsWith(this.source.getName()) + && !NetworkTableUtils.isMetadata(source.getId()); } @Override