Skip to content

Commit a8c4999

Browse files
author
kasemir
committed
RTPlot: Only show Y axis labels for visible traces
When hiding a trace, and there are multiple traces on an axis, all trace labels were shown. Now only names of visible traces are shown, so hiding a trace removes both the trace itself and its axis label
1 parent 119bd96 commit a8c4999

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

app/rtplot/src/main/java/org/csstudio/javafx/rtplot/internal/AxisLabelProvider.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2014-2015-2016 Oak Ridge National Laboratory.
2+
* Copyright (c) 2014-2024 Oak Ridge National Laboratory.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v1.0
55
* which accompanies this distribution, and is available at
@@ -98,10 +98,11 @@ public void start()
9898
}
9999
if (use_trace_names)
100100
for (TraceImpl<XTYPE> trace : axis.getTraces())
101-
{
102-
labels.add(trace.getLabel());
103-
colors.add(trace.getColor());
104-
}
101+
if (trace.isVisible())
102+
{ // Only show labels for visible traces)
103+
labels.add(trace.getLabel());
104+
colors.add(trace.getColor());
105+
}
105106
}
106107

107108
/** @return <code>true</code> if there is one more label */

0 commit comments

Comments
 (0)