mirror of
https://github.com/jankae/LibreVNA.git
synced 2025-12-06 07:12:10 +01:00
show trace names for traces which are only on secondary Y axis
This commit is contained in:
parent
8a56b36166
commit
fde6707c9c
|
|
@ -1040,8 +1040,14 @@ void TraceXYPlot::enableTraceAxis(Trace *t, int axis, bool enabled)
|
||||||
// unable to add trace to the requested axis
|
// unable to add trace to the requested axis
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(axis == 0) {
|
if(enabled) {
|
||||||
TracePlot::enableTrace(t, enabled);
|
TracePlot::enableTrace(t, true);
|
||||||
|
} else {
|
||||||
|
// only disable trace on parent trace list if disabled for both axes
|
||||||
|
int otherAxis = axis ? 0 : 1;
|
||||||
|
if(tracesAxis[otherAxis].find(t) == tracesAxis[otherAxis].end()) {
|
||||||
|
TracePlot::enableTrace(t, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
bool alreadyEnabled = tracesAxis[axis].find(t) != tracesAxis[axis].end();
|
bool alreadyEnabled = tracesAxis[axis].find(t) != tracesAxis[axis].end();
|
||||||
if(alreadyEnabled != enabled) {
|
if(alreadyEnabled != enabled) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue